code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Main where
import Safe.Length (safeLength)
import Data.Proxy (Proxy(..))
main :: IO ()
main = print $ safeLength (Proxy :: Proxy (Char, Char)) ('a', 'b')
| stepcut/safe-length | example/GoodTuple.hs | bsd-3-clause | 164 | 0 | 9 | 28 | 73 | 43 | 30 | 5 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Ivory.ModelCheck.CVC4 where
import Prelude ()
import Prelude.Compat hiding (exp)
#if !MIN_VERSION_base(4... | GaloisInc/ivory | ivory-model-check/src/Ivory/ModelCheck/CVC4.hs | bsd-3-clause | 11,972 | 0 | 17 | 3,375 | 4,419 | 2,402 | 2,017 | 301 | 21 |
{-# LANGUAGE Safe #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE Arrows #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module
Control.Arrow.Machine.Misc.Discrete
(
-- * Discrete type
-- $type
T(),
updates,
... | as-capabl/machinecell | src/Control/Arrow/Machine/Misc/Discrete.hs | bsd-3-clause | 5,610 | 3 | 14 | 1,667 | 2,248 | 1,169 | 1,079 | 176 | 1 |
module Generics.GPAH.Date.Base where
import Control.DeepSeq
import Data.Monoid
import qualified Data.Map as M
data Analysis = Analysis {
yearUpdatesToSyb :: M.Map Int Int
, yearUpdatesToUpl :: M.Map Int Int
, yearNewToSyb :: M.Map Int Int
, yearNewToU... | bezirg/gpah | src/Generics/GPAH/Date/Base.hs | bsd-3-clause | 1,716 | 0 | 12 | 976 | 387 | 217 | 170 | 32 | 0 |
module Input
( AppInput
, parseWinInput
, mousePos
, lbp
, lbpPos
, lbDown
, rbp
, rbpPos
, rbDown
, quitEvent
) where
import Data.Maybe
import FRP.Yampa
import Linear (V2(..))
import Linear.Affine (Point(..))
import qualified SDL
... | pyrtsa/yampa-demos-template | src/Input.hs | bsd-3-clause | 3,210 | 0 | 14 | 915 | 772 | 435 | 337 | 62 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module Yahoofinance
( getHistoricalData
, HistoricalQuote (..)
, QuoteMap
, buildHistoricalDataQuery
, QuoteSymbol
) where
import Control.Applicative
import Data.Aeson
import qualified Data.ByteString.Lazy as B
import qualified Data.ByteString.Lazy.Char8 as ... | vimster/stocker | src/Yahoofinance.hs | bsd-3-clause | 4,259 | 0 | 14 | 946 | 1,135 | 609 | 526 | 98 | 2 |
{-# LANGUAGE TupleSections #-}
module GenoEquiv (uniformEquivMat,allEquivMats,uniformList,linearCombMats) where
import Common
import Prelude hiding (replicate, map, foldl1, zipWith, map, concat, reverse, length, head, map, concatMap, (++), zipWith)
import Data.List.Stream as DL
import Numeric.Container as NC
import D... | cglazner/ibd_stitch | src/GenoEquiv.hs | bsd-3-clause | 1,735 | 1 | 15 | 487 | 609 | 328 | 281 | 31 | 3 |
{-# language FlexibleInstances, ScopedTypeVariables #-}
module LibSpec where
import qualified Data.Vector as V
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck
import Lib
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "Numerical functions" $ do
-- it "works" $
-- ... | ocramz/test-ru-stream-regression | test/LibSpec.hs | bsd-3-clause | 1,380 | 0 | 15 | 311 | 403 | 217 | 186 | 32 | 1 |
{-# LANGUAGE ConstraintKinds, CPP, DeriveDataTypeable, FlexibleContexts, OverloadedStrings #-}
module Facebook.Graph
( getObject
, getObjectRec
, postObject
, postForm
, postFormVideo
, deleteForm
, deleteObject
, searchObjects
, (#=)
, SimpleType(..)
, Place(..)
, Locati... | BeautifulDestinations/fb | src/Facebook/Graph.hs | bsd-3-clause | 13,935 | 2 | 16 | 3,676 | 2,833 | 1,554 | 1,279 | 246 | 1 |
module Utils where
import System.Directory (doesFileExist)
import System.Environment (getEnv)
import System.FilePath ((</>))
import System.IO.Error (tryIOError)
import qualified Paths_elm_server as This
-- |The absolute path to a data file
getDataFile :: FilePath -> IO FilePath
getDataFile name = do
path <- This.ge... | alisheikh/elm-server | server/Utils.hs | bsd-3-clause | 1,467 | 0 | 17 | 451 | 221 | 122 | 99 | 33 | 3 |
module Idris.Unlit(unlit) where
import Idris.Core.TT
import Data.Char
unlit :: FilePath -> String -> TC String
unlit f s = do let s' = map ulLine (lines s)
check f 1 s'
return $ unlines (map snd s')
data LineType = Prog | Blank | Comm
ulLine :: String -> (LineType, String)
ulLine ('>':... | ctford/Idris-Elba-dev | src/Idris/Unlit.hs | bsd-3-clause | 998 | 0 | 12 | 282 | 481 | 247 | 234 | 22 | 1 |
module Main where
import Suck
import Spew
import System.Environment
-- maximally naive approach to command line input
main :: IO ()
main = do
[input] <- getArgs
if input == "load-model"
then suckDefaultsToFile
else spew (read input) >>= putStrLn
| rudyardrichter/sokal | main.hs | mit | 272 | 0 | 11 | 65 | 69 | 38 | 31 | 10 | 2 |
module CO4.Prefixfree
(numeric, invNumeric, discriminates)
where
import qualified Control.Exception as Exception
import Satchmo.Core.Primitive (Primitive,isConstant)
import CO4.Util (bitWidth)
numeric :: Integral i => i -> [Bool] -> i
numeric n' xs' = go 0 n' xs'
where
go sum 1 _ = sum
... | apunktbau/co4 | src/CO4/Prefixfree.hs | gpl-3.0 | 1,251 | 0 | 13 | 419 | 474 | 248 | 226 | 28 | 4 |
module Ex3 where
m f (h:t) = f h : f t
| roberth/uu-helium | test/typeerrors/Edinburgh/Ex3.hs | gpl-3.0 | 40 | 0 | 7 | 13 | 31 | 16 | 15 | 2 | 1 |
-- |
-- Lens are immensely useful for working with state but I don't want
-- to pull in full Kmettoverse for small set of combinators.
--
-- Here we redefine all necessary combinators. Full compatibility with
-- lens is maintained.
{-# LANGUAGE RankNTypes #-}
module DNA.Lens where
import Control.Applicative
import Con... | SKA-ScienceDataProcessor/RC | MS3/lib/DNA/Lens.hs | apache-2.0 | 1,731 | 0 | 15 | 475 | 820 | 419 | 401 | 43 | 2 |
-- | Re-export the common parts of the server framework.
--
module Distribution.Server.Framework (
module Happstack.Server.Routing,
module Happstack.Server.Response,
module Happstack.Server.RqData,
module Happstack.Server.FileServe,
module Happstack.Server.Error,
module Happstack.Server.Monads,... | haskell-infra/hackage-server | Distribution/Server/Framework.hs | bsd-3-clause | 2,380 | 0 | 6 | 250 | 433 | 306 | 127 | 55 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
import Prelude ()
import Prelude.Compat
import Data.Text (Text, pack)
import Data.Text.IO as T (putStrLn)
import qualified GitHub.Endpoints.Users.Followers as GitHub
main :: IO ()
main = do
possibleUsers <- GitHub.usersFollowing "mike... | jwiegley/github | samples/Users/Followers/Example.hs | bsd-3-clause | 576 | 1 | 13 | 133 | 152 | 86 | 66 | 15 | 1 |
module CodeGen.Header(generateHeader) where
import Control.Arrow ((&&&))
import Data.List (partition)
import CodeGen.Typeclasses
import CodeGen.CCodeNames
import CodeGen.Function
import CodeGen.Type ()
import CCode.Main
import CCode.PrettyCCode ()
import qualified AST.AST as A
import qualified Identifiers as ID
imp... | Paow/encore | src/back/CodeGen/Header.hs | bsd-3-clause | 11,851 | 0 | 46 | 4,385 | 2,991 | 1,519 | 1,472 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE PatternGuards #-}
-- |
-- Module : Data.Array.Accelerate.CUDA.FullList
-- Copyright : [2008..2014] Manuel M T Chakravarty, Gabriele Keller
-- [2009..2014] Trevor L. McDonell
-- License : BSD3
--
-- Maintainer : Trevor L. McDonell <tmcdonell@cse.unsw.... | kumasento/accelerate-cuda | Data/Array/Accelerate/CUDA/FullList.hs | bsd-3-clause | 3,283 | 0 | 11 | 1,010 | 1,292 | 656 | 636 | 77 | 2 |
{-# LANGUAGE RebindableSyntax,NoImplicitPrelude,OverloadedLists #-}
import SubHask
import SubHask.Algebra.HMatrix
import HLearn.History
import HLearn.History.DisplayMethods
import HLearn.Optimization.Common
import HLearn.Optimization.GradientDescent
-- import HLearn.Optimization.StochasticGradientDescent
import HLear... | ehlemur/HLearn | examples/optimization/optimization.hs | bsd-3-clause | 2,194 | 1 | 15 | 734 | 703 | 376 | 327 | 50 | 3 |
{-# LANGUAGE TemplateHaskell, TypeSynonymInstances, FlexibleInstances,
MultiParamTypeClasses, TypeOperators, FlexibleContexts , RankNTypes,
GADTs, ScopedTypeVariables, EmptyDataDecls, ConstraintKinds #-}
module Data.Comp.Multi.Variables_Test where
import Data.Comp.Multi.Variables
import Data.Comp.Multi.Derive
import... | spacekitteh/compdata | testsuite/tests/Data/Comp/Multi/Variables_Test.hs | bsd-3-clause | 3,379 | 0 | 11 | 693 | 1,071 | 587 | 484 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
module Util.UnionFindST(
Element,
T,
UF(),
find,
fromElement,
getElements,
getUnique,
getW,
liftST,
new,
new_,
putW,
runUF,
union,
union_,
updateW
) where
import Control.Monad.Reader
import Control.Monad.ST
import Data.STRe... | hvr/jhc | src/Util/UnionFindST.hs | mit | 3,389 | 0 | 17 | 1,116 | 1,691 | 822 | 869 | 111 | 2 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="it-IT">
<title>AMF Support</title>
<maps>
<homeID>amf</homeID>
<mapref location="map.jh... | kingthorin/zap-extensions | addOns/amf/src/main/javahelp/help_it_IT/helpset_it_IT.hs | apache-2.0 | 956 | 82 | 52 | 156 | 390 | 206 | 184 | -1 | -1 |
module Where1 where
f3 x
= (ls, rs)
where
ls = x + 1
rs = x - 1
f1 :: Int -> Int
f1 x = ls where ls = x + 1
f2 :: Int -> Int
f2 x = rs where rs = x - 1
| kmate/HaRe | old/testing/merging/Where1AST.hs | bsd-3-clause | 179 | 0 | 7 | 76 | 94 | 52 | 42 | 9 | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="si-LK">
<title>Active Scan Rules - Blpha | ZAP Extension</title>
<maps>
<homeID>top</homeID... | 0xkasun/security-tools | src/org/zaproxy/zap/extension/wavsepRpt/resources/help_si_LK/helpset_si_LK.hs | apache-2.0 | 987 | 85 | 53 | 163 | 405 | 213 | 192 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude, PatternSynonyms #-}
{-# OPTIONS_GHC -Wall #-}
module Test where
x :: ()
x = ()
pattern Point2 :: () -> () -> ((), ())
pattern Point2 x y = (x, y)
pattern Point :: () -> () -> ((), ())
pattern Point{x1, y1} = (x1, y1)
| snoyberg/ghc | testsuite/tests/patsyn/should_compile/T12615.hs | bsd-3-clause | 252 | 0 | 9 | 52 | 120 | 68 | 52 | 9 | 1 |
{-# LANGUAGE MultiParamTypeClasses, PolyKinds #-}
{-# OPTIONS_GHC -fprint-explicit-kinds #-}
module TidyClassKinds where
import Data.Proxy
class Poly a b
type ProxySyn = Proxy
instance Poly ProxySyn ProxySyn
-- output should really talk about k1 and k2, not about k and k!
| olsner/ghc | testsuite/tests/polykinds/TidyClassKinds.hs | bsd-3-clause | 280 | 0 | 5 | 47 | 36 | 21 | 15 | -1 | -1 |
module Bio.VCF.Parser.Helpers
( tabOrSpace
, isTab
, isSpace
, notTabOrSpace
, isNumber
, isFloatNumber
, isBase
, isBaseOrDeletion
, endOfLine
) where
import Data.Word (Word8)
tabOrSpace :: Word8 -> Bool
tabOrSpace c = isTab c || isSpace c
isTab :: Word8 -> Bool
isTab c = c == 9
isSpace :: Word8 -> Bool
isSpace c ... | juanpaucar/vcf | src/Bio/VCF/Parser/Helpers.hs | mit | 1,017 | 0 | 23 | 313 | 373 | 201 | 172 | 34 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SVGLineElement
(js_getX1, getX1, js_getY1, getY1, js_getX2, getX2, js_getY2,
getY2, SVGLineElement, castToSVGLineElement, gTypeSVGLineElement)
where
import Prelude ((.), (==), (>>=), return, ... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/SVGLineElement.hs | mit | 2,562 | 24 | 11 | 342 | 659 | 385 | 274 | 42 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Writer.Data
-- License : MIT (see the LICENSE file)
-- Maintainer : Felix Klein (klein@react.uni-saarland.de)
--
-- Common data used by the writer module.
--
------------------------------------------------------... | reactive-systems/syfco | src/lib/Writer/Data.hs | mit | 5,441 | 0 | 11 | 933 | 641 | 404 | 237 | 94 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Config.EnvSpec
( main
, spec
) where
import Test.Hspec
import Test.QuickCheck.Instances ()
import System.Environment
import qualified Data.Map as M
import Servant.Client
import Config
-- -----... | UlfS/ghmm | test/Config/EnvSpec.hs | mit | 1,730 | 0 | 18 | 529 | 364 | 210 | 154 | 39 | 1 |
{-# htermination scanl :: (a -> b -> a) -> a -> [b] -> [a] #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_scanl_1.hs | mit | 63 | 0 | 2 | 16 | 3 | 2 | 1 | 1 | 0 |
module Universe.Objects.Shape (
Shape(..)
) where
import Measures
data Shape d = Spherical (MeasuredVal d Distance)
| ShapeTODO -- TODO
| fehu/hgt | core-universe/src/Universe/Objects/Shape.hs | mit | 156 | 0 | 8 | 40 | 41 | 26 | 15 | 5 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DeriveGeneric #-}
module Bot.NetHack.ScreenPattern
( ScreenPattern()
, Match(..)
, Detailed(..)
, match
, regex
, limitRows
, debugPattern )
where
import Data.Data
import Data.Foldable
import qualified Data.Set as S
im... | Noeda/adeonbot | bot/src/Bot/NetHack/ScreenPattern.hs | mit | 3,804 | 0 | 18 | 910 | 1,269 | 666 | 603 | 116 | 4 |
-- | "GHC.Generics"-based 'Test.QuickCheck.arbitrary' generators.
--
-- = Basic usage
--
-- @
-- {-\# LANGUAGE DeriveGeneric \#-}
--
-- data Foo = A | B | C -- some generic data type
-- deriving 'GHC.Generics.Generic'
-- @
--
-- Derive instances of 'Test.QuickCheck.Arbitrary'.
--
-- @
-- instance Arbitrary Foo where... | Lysxia/generic-random | src/Generic/Random.hs | mit | 6,844 | 0 | 5 | 1,634 | 467 | 371 | 96 | 73 | 0 |
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
import Test.Hspec
import Yage.Prelude hiding (group)
import Yage.Math
import Yage.Lens hiding (elements)
import qualified Data.Vector as V
import Data.Vinyl.Instances ()
import Yage.Formats.Obj
import Yage.Fo... | MaxDaten/yage | test/ObjParsingTest.hs | mit | 9,674 | 0 | 26 | 3,093 | 2,456 | 1,225 | 1,231 | -1 | -1 |
module Question where
-- https://mail.haskell.org/pipermail/beginners/2017-November/017921.html
notThe :: String -> Maybe String
notThe word
| word == "the" = Nothing
| otherwise = Just word
replaceThe :: String -> String
replaceThe word = go $ words word
where
go [] = ""
go (x:xs) =
... | brodyberg/Notes | csv/csv1/src/Question.hs | mit | 721 | 0 | 11 | 254 | 150 | 78 | 72 | 12 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module ZoomHub.Web.Types.OpenSeadragonTileSource
( OpenSeadragonTileSource,
fromDeepZoomImage,
)
where
import Data.Aeson (ToJSON, object, toJSON, (.=))
import qualified Data.Text as T
import System.FilePath (dropExtension)
import ZoomHub.API.Types.DeepZoomImage
( DeepZoomI... | zoomhub/zoomhub | src/ZoomHub/Web/Types/OpenSeadragonTileSource.hs | mit | 1,300 | 0 | 17 | 364 | 268 | 156 | 112 | 35 | 1 |
{-# LANGUAGE OverloadedStrings, ExtendedDefaultRules #-}
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Monadic (assert, monadicIO)
import Data.Functor
import Control.Monad
import Database.Bicod
import Database.MongoDB
--newtype Alpha = Alpha { runAplha :: [Char] } deriving (Eq, Show)
--instance Ar... | teamon/bicod | test/Spec.hs | mit | 1,954 | 0 | 29 | 501 | 433 | 221 | 212 | 30 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverlappingInstances #-}
module System.Console.Questioner
(
Question(..)
, ChoiceEvent
, charToChoiceEvent
, listPrompt
, checkboxPrompt
, module System.Cons... | yamadapc/stack-run | unix/System/Console/Questioner.hs | mit | 10,300 | 0 | 20 | 4,128 | 2,509 | 1,303 | 1,206 | -1 | -1 |
module MachineLearning.SupervisedLearning.Regression.Macro where
import Types
import Functions.Application.Macro
-- | Concrete noise modeling random variable
nois_ :: Note
nois_ = epsilon
-- | Residual sum of squares
rss :: Note -- ^ Beta parameter
-> Note
rss = fn "RSS"
-- | Ridge cost
rid... | NorfairKing/the-notes | src/MachineLearning/SupervisedLearning/Regression/Macro.hs | gpl-2.0 | 526 | 0 | 6 | 135 | 94 | 57 | 37 | 16 | 1 |
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Search.Internal
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
--
-- Internal use for Yi.Search.
module Yi.Search.Internal where
import Control.Lens (assign, use)
import Yi... | atsukotakahashi/wi | src/library/Yi/Search/Internal.hs | gpl-2.0 | 997 | 0 | 7 | 162 | 137 | 83 | 54 | 11 | 1 |
invertir::[int]->[int]
invertir [ ] = [ ]
invertir (x:xs) = (invertir xs) ++[x] | travelerfit/Ejercicios-Haskell | ordenar.hs | gpl-2.0 | 79 | 0 | 7 | 12 | 56 | 30 | 26 | 3 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE EmptyDataDecls #-}
module JSAPI (
Foreign
, Event
, Element
, addEventListener
, addWindowEventListener
, getElementById
, getElementsById
, setClassName
, setInterval
, alert
, mapM
) where
import Prelude
import FFI
class Foreign a
data Even... | SneakingCat/fay-ticker | src/JSAPI.hs | gpl-3.0 | 1,559 | 0 | 10 | 290 | 384 | 203 | 181 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
module Bamboo.Theme.MiniHTML5.Widget.Navigation where
import Bamboo.Theme.MiniHTML5.Env hiding (header, current, link)
import qualified Bamboo.Type.Config as C
import qualified Bamboo.Type.State as State
import Bamboo.Helper (drop_known_extension)
navigation :: Widget
navigation s... | nfjinjing/bamboo-theme-mini-html5 | src/Bamboo/Theme/MiniHTML5/Widget/Navigation.hs | gpl-3.0 | 928 | 2 | 17 | 222 | 261 | 148 | 113 | 18 | 4 |
{-# LANGUAGE PackageImports #-}
import "cruzo" Application (getApplicationDev)
import Network.Wai.Handler.Warp
(runSettings, defaultSettings, settingsPort)
import Control.Concurrent (forkIO)
import System.Directory (doesFileExist, removeFile)
import System.Exit (exitSuccess)
import Control.Concurrent (threadDelay)
... | ajdunlap/cruzo | devel.hs | gpl-3.0 | 699 | 0 | 10 | 123 | 186 | 101 | 85 | 23 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
module Lamdu.GUI.ExpressionEdit.EventMap
( make
, modifyEventMap
, jumpHolesEventMap
) where
import Prelude.Compat
import Control.Applicative (liftA2)
import qualified Control.Lens as Lens
import Control.Lens.Operators
import C... | rvion/lamdu | Lamdu/GUI/ExpressionEdit/EventMap.hs | gpl-3.0 | 7,233 | 0 | 20 | 1,770 | 1,938 | 1,000 | 938 | -1 | -1 |
-- | Import/Export JSON support
{-# LANGUAGE NoImplicitPrelude, TemplateHaskell, OverloadedStrings, FlexibleContexts, LambdaCase #-}
module Lamdu.Data.Export.JSON
( fileExportRepl, jsonExportRepl
, fileExportAll
, fileExportDef
, fileImportAll
) where
import qualified Control.Lens as Lens
import ... | da-x/lamdu | Lamdu/Data/Export/JSON.hs | gpl-3.0 | 9,236 | 0 | 15 | 2,179 | 2,882 | 1,475 | 1,407 | -1 | -1 |
{-|
Description : Working with lines of code
-}
module Language.Haskell.Formatter.Process.LineTool
(Shifter, Shift, countEmptyLines, createShifter, shiftCode) where
import qualified Data.Map.Strict as Map
import qualified Language.Haskell.Formatter.Location as Location
import qualified Language.Haskell.Formatter... | evolutics/haskell-formatter | src/library/Language/Haskell/Formatter/Process/LineTool.hs | gpl-3.0 | 1,537 | 0 | 9 | 258 | 385 | 213 | 172 | 30 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/UserProFiles/List.hs | mpl-2.0 | 4,411 | 0 | 16 | 1,031 | 632 | 370 | 262 | 96 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-bigtableadmin/gen/Network/Google/Resource/BigtableAdmin/Projects/Instances/List.hs | mpl-2.0 | 5,596 | 0 | 17 | 1,287 | 798 | 466 | 332 | 119 | 1 |
module AlternateCase where
import Data.Char
alternateCase :: String -> String
alternateCase = ((\x -> if isUpper x then toLower x else toUpper x) <$>)
| ice1000/OI-codes | codewars/1-100/alternate-case.hs | agpl-3.0 | 153 | 0 | 9 | 26 | 52 | 30 | 22 | 4 | 2 |
data Customer = Customer {
customerID :: Int,
customerName :: String,
customerAddress :: [String]
} deriving (Show)
| aniketd/learn.haskell | RWH/4_and_before/bookStore.hs | unlicense | 130 | 0 | 9 | 31 | 38 | 23 | 15 | 5 | 0 |
{-# LANGUAGE ForeignFunctionInterface #-}
module Ffi where
import Control.Monad
import Data.Vector.Storable as V
import Foreign hiding (unsafePerformIO)
import Foreign.C
import System.IO.Unsafe
foreign import ccall unsafe "ffi.h" nativeC :: Ptr CDouble -> CInt -> IO (Ptr CDouble)
doubleVec :: Vector Double -> Vecto... | jstolarek/sandbox | haskell/ffi/demo/src/Ffi.hs | unlicense | 613 | 0 | 13 | 110 | 188 | 97 | 91 | 15 | 1 |
{-
Copyright 2014 huwei04@hotmail.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed t... | wehu/hw | src/Resolver.hs | apache-2.0 | 6,752 | 0 | 32 | 2,913 | 2,082 | 1,037 | 1,045 | 157 | 8 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Kubernetes.V1.Lifecycle where
import GHC.Generics
import Kubernetes.V1.Handler
import qualified Data.Aeson
-- | Lifecycle describes actions th... | minhdoboi/deprecated-openshift-haskell-api | kubernetes/lib/Kubernetes/V1/Lifecycle.hs | apache-2.0 | 1,539 | 0 | 9 | 211 | 94 | 57 | 37 | 15 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Openshift.V1.GitBuildSource where
import GHC.Generics
import Data.Text
import qualified Data.Aeson
-- |
data GitBuildSource = GitBuildSource
... | minhdoboi/deprecated-openshift-haskell-api | openshift/lib/Openshift/V1/GitBuildSource.hs | apache-2.0 | 838 | 0 | 9 | 151 | 110 | 67 | 43 | 17 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- | DAG-based model for morphosyntactic tagging.
module NLP.Concraft.Polish.DAGSeg
(
-- * Types
Tag
-- ** Simplification
, simplify4gsr
, complexify4gsr
, simplify4dmb
-- ** Model
, C.Concraft
, C.saveModel
... | kawu/concraft-pl | src/NLP/Concraft/Polish/DAGSeg.hs | bsd-2-clause | 21,133 | 0 | 15 | 5,238 | 3,802 | 2,146 | 1,656 | 277 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE CPP #-}
module Devel
( devel
) where
import qualified Distribution.Simple.Utils as D
import qualified Distribution.Verbosity as D
imp... | chreekat/yesod | yesod/Devel.hs | bsd-2-clause | 7,176 | 0 | 22 | 2,104 | 1,884 | 949 | 935 | 157 | 5 |
{-# LANGUAGE DeriveDataTypeable #-}
module Data.Text.Punycode.Decode (PunycodeDecodeException (..), decode) where
import Control.Exception.Base
import qualified Data.ByteString as BS
import Data.Char
import Data.Serialize hiding (decode)
import qualified Data.Text as T
import D... | litherum/punycode | Data/Text/Punycode/Decode.hs | bsd-2-clause | 3,681 | 0 | 15 | 1,121 | 1,349 | 670 | 679 | 86 | 4 |
{-# LANGUAGE BangPatterns, ScopedTypeVariables #-}
{-# OPTIONS_HADDOCK hide #-}
-- |
-- Module : Numeric.SpecFunctions.Internal
-- Copyright : (c) 2009, 2011, 2012 Bryan O'Sullivan
-- License : BSD3
--
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : portable
--
-- Internal module... | bos/math-functions | Numeric/SpecFunctions/Internal.hs | bsd-2-clause | 46,384 | 2 | 34 | 13,631 | 11,161 | 6,035 | 5,126 | 839 | 4 |
{-# LANGUAGE TupleSections, OverloadedStrings, ScopedTypeVariables #-}
module Handler.Home where
import Import
import qualified Data.Conduit as C
import qualified Data.Conduit.List as CL
import qualified Data.Text as T
import Data.Time.Clock
import Database.Persist.GenericSql.Raw
import Database.Persist.Store
import ... | tanakh/hackage-mirror | Handler/Home.hs | bsd-2-clause | 2,562 | 0 | 19 | 655 | 944 | 477 | 467 | -1 | -1 |
-- |
-- Module : Enterprise.FizzBuzz
-- Copyright : (c) 2013 Josh Hawkins & Mike Bethany
--
-- License : BSD-style
-- Maintainer : josh@josh.com
-- Stability : experimental
-- Portability : GHC
--
-- Putting some Fizz and Buzz in your numbers!
module Enterprise.FizzBuzz
(
functionToPad1,
func... | JHawk/enterpriseFizzBuzz | src/Enterprise/FizzBuzz.hs | bsd-3-clause | 1,666 | 0 | 9 | 371 | 348 | 197 | 151 | 39 | 2 |
module Printer where
{-|
>>> :{
let callback name = do
putStrLn $ "Hello. Yes, this is " ++ name
>>> :}
>>> printer "Dog" callback
Dog says:
Hello. Yes, this is Dog
-}
printer :: String -> (String -> IO ()) -> IO ()
printer name callBack = putStrLn $ name ++ " says:"
| pfcuttle/twentyfour-2013 | src/doctest/Printer.hs | bsd-3-clause | 282 | 0 | 10 | 69 | 53 | 28 | 25 | 3 | 1 |
module Paths (tests) where
import Data.Monoid
import PathFinder.Core
import PathFinder.Types
import Control.Lens (preview, _Just)
import Test.Tasty
import Test.Tasty.Hspec
import qualified Data.Map as Map
tests :: TestTree
tests = testGroup "tests"
[ te... | markus1189/pathfinder | tests/Paths.hs | bsd-3-clause | 1,665 | 0 | 16 | 494 | 294 | 178 | 116 | 20 | 1 |
{-# Language DeriveFunctor #-}
module Spell where
import Control.Monad.Free
-- | 10 is the magic number for everything
data CastType
= Beam
| BlastRadius
| Target
deriving (Show)
data Element
= Earth -- knocked down, no movement
| Wind -- slowed, half action points
| Water -- frozen, skip turn
| Fir... | aspidites/functional | src/Spell.hs | bsd-3-clause | 1,563 | 0 | 9 | 345 | 631 | 330 | 301 | 53 | 1 |
{-# LANGUAGE CPP #-}
{-# OPTIONS -fno-warn-missing-signatures #-}
-- | Sequential implementation of the segmented array API defined in
-- @dph-prim-interface@.
--
-- There is a parallel implementation in @dph-prim-par@,
-- so you probably want that instead.
-- The API is defined in @DPH_Header.h@ and @DPH_I... | mainland/dph | dph-prim-seq/Data/Array/Parallel/Unlifted.hs | bsd-3-clause | 9,060 | 0 | 7 | 3,382 | 1,172 | 685 | 487 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Handler.Index where
import qualified Data.Text as T
import Snap.Snaplet
import Heist
import Snap.Snaplet.Heist
import Snap.Snaplet.Auth
import State.Site
import Splice.Site
import Application
indexHandler :: AppHandler ()
indexHandler = do
mu <- with auth currentUser
s... | dbp/positionsites | src/Handler/Index.hs | bsd-3-clause | 518 | 0 | 13 | 103 | 152 | 81 | 71 | 17 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCas... | supermario/stack | src/Stack/Setup.hs | bsd-3-clause | 64,606 | 0 | 31 | 21,435 | 14,408 | 7,124 | 7,284 | 1,207 | 13 |
module ListUtils where
import Graphics.Vty.Widgets.All
import Control.Applicative ((<$>))
import Control.Monad (liftM, void)
import Data.Maybe (catMaybes, fromMaybe)
import Data.List (find)
-- | List helper
-- Replaces an item in a Vty Widget List at a given position. If the index is
-- `Nothing`, the item will be ad... | angerman/HInvoice | ListUtils.hs | bsd-3-clause | 2,214 | 0 | 15 | 586 | 512 | 265 | 247 | 33 | 1 |
-- | This module allows for the 'promote' function to be imported
-- correctly from different QuickCheck versions. QuickCheck 2.6 used
-- Test.QuickCheck.Gen.promote; QuickCheck 2.7 uses
-- Test.QuickCheck.Gen.Unsafe.promote. For use with old versions of
-- QuickCheck, Cabal will import a different version of this mo... | massysett/barecheck | lib/Barecheck/Promote.hs | bsd-3-clause | 449 | 0 | 5 | 61 | 29 | 21 | 8 | 2 | 0 |
import qualified Network.HTTP as HTTP
import Data.List.Split (splitOn)
import Data.List (isInfixOf, sortBy, reverse, foldl')
import Data.Char (toLower)
import qualified Data.Map as Map
import Options.Applicative
import Data.Semigroup ((<>))
data Args = Args
{ fname :: String
, addr :: String
, numwords ... | dgtony/hckrnewsparser | src/main.hs | bsd-3-clause | 2,878 | 0 | 17 | 769 | 957 | 494 | 463 | 72 | 2 |
module Main where
import System.Environment
import qualified Lib
main :: IO ()
main =
getArgs
>>= (\[x, y] -> Lib.buildTree 0 x y)
>>= print
| koulakis/FiletreeAnalyser | app/Main.hs | bsd-3-clause | 163 | 0 | 10 | 47 | 59 | 34 | 25 | 8 | 1 |
-- Utility for adding the Fibon directory for a new benchmark
module Main (main) where
import Control.Monad
import Data.Char as Char
import Data.List
import Distribution.Package
import Distribution.PackageDescription
import Distribution.PackageDescription.Configuration
import Distribution.PackageDescription.Parse
imp... | dmpots/fibon | tools/fibon-init/Main.hs | bsd-3-clause | 3,817 | 0 | 13 | 838 | 989 | 501 | 488 | 113 | 3 |
{-# LANGUAGE PatternGuards #-}
module Idris.Elab.Clause where
import Idris.AbsSyntax
import Idris.ASTUtils
import Idris.DSL
import Idris.Error
import Idris.Delaborate
import Idris.Imports
import Idris.ElabTerm
import Idris.Coverage
import Idris.DataOpts
import Idris.Providers
import Idris.Primitives
import Idris.Inlin... | andyarvanitis/Idris-dev | src/Idris/Elab/Clause.hs | bsd-3-clause | 44,724 | 10 | 28 | 17,926 | 13,156 | 6,529 | 6,627 | 724 | 38 |
{-# LANGUAGE CPP, ScopedTypeVariables #-}
{-# LANGUAGE GADTs #-}
module Llvm.Pass.Mem2Reg (mem2reg) where
import Compiler.Hoopl
import Llvm.Hir.Data
import qualified Data.Map as Dm
import qualified Data.Set as Ds
import Control.Monad
import Llvm.Pass.Rewriter (rwNode,nodeToGraph)
import Prelude hiding(lookup)
#ifdef D... | mlite/hLLVM | src/Llvm/Pass/Mem2Reg.hs | bsd-3-clause | 4,577 | 0 | 16 | 1,472 | 1,294 | 669 | 625 | 63 | 3 |
{-# LANGUAGE OverloadedStrings, RankNTypes, RecordWildCards,
ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-missing-signatures
-fno-warn-unused-binds #-}
module UnitTests (testWith) where
import Control.Applicative ((<$>))
import Control.Concurrent (forkIO, killThread)
import ... | Feeniks/wreq | tests/UnitTests.hs | bsd-3-clause | 15,911 | 0 | 23 | 3,770 | 5,085 | 2,545 | 2,540 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module VSim.Data.TInt where
import Data.Int
import Data.Bits
import Foreign.Storable
import Text.Printf
newtype TInt = TInt { tintToInt32 :: Int32 }
deriving (Eq, Ord, Num, Enum, Real, Integral, Storable, Bounded, Bits, PrintfArg)
instance Show TInt where
showsPrec... | ierton/vsim | src/VSim/Data/TInt.hs | bsd-3-clause | 516 | 0 | 11 | 93 | 183 | 101 | 82 | 14 | 1 |
-- | doctest utilities
module Flat.Instances.Test (
tst,
tstBits,
asList,
flatBits,
allBits,
prettyShow,
module Data.Word,
) where
import Data.Word
import Flat.Bits (
asBytes,
bits,
paddedBits,
)
import Flat.Class (Flat (..))
import Flat.Run (
flat,
unflat,
)
import Fl... | tittoassini/flat | src/Flat/Instances/Test.hs | bsd-3-clause | 1,146 | 0 | 9 | 254 | 414 | 232 | 182 | 31 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.SBV.BitVectors.Polynomials
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : experimental
--
-- Implementation of polynomial arithmetic
-----------------... | Copilot-Language/sbv-for-copilot | Data/SBV/Tools/Polynomial.hs | bsd-3-clause | 11,405 | 0 | 14 | 2,772 | 3,159 | 1,685 | 1,474 | 140 | 5 |
{-# LANGUAGE RankNTypes #-}
{- |
Module : ./TopHybrid/Parse_AS.hs
License : GPLv2 or higher, see LICENSE.txt
Maintainer : nevrenato@gmail.com
Stability : provisional
Portability : portable
Description :
Parser for an hybridized arbitrary logic
-}
module TopHybrid.Parse_AS where
import Common.Anno... | spechub/Hets | TopHybrid/Parse_AS.hs | gpl-2.0 | 5,033 | 0 | 20 | 1,631 | 1,486 | 697 | 789 | 137 | 1 |
-- The intention is that this will be the new unit test framework.
-- Please add any working tests here. This file should do nothing
-- but import tests from other modules.
--
-- Stephen Blackheath, 2009
module Main where
import PackageTests.BenchmarkExeV10.Check
import PackageTests.BenchmarkOptions.Check
import Pac... | jwiegley/ghc-release | libraries/Cabal/cabal/tests/PackageTests.hs | gpl-3.0 | 8,351 | 0 | 17 | 1,494 | 1,476 | 844 | 632 | 136 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-iam/gen/Network/AWS/IAM/ListSigningCertificates.hs | mpl-2.0 | 6,637 | 0 | 14 | 1,320 | 800 | 475 | 325 | 83 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-ec2/gen/Network/AWS/EC2/ModifyImageAttribute.hs | mpl-2.0 | 7,051 | 0 | 12 | 1,439 | 1,122 | 666 | 456 | 126 | 1 |
-- |
-- Module : Foundation.Parser
-- License : BSD-style
-- Maintainer : Haskell Foundation
-- Stability : experimental
-- Portability : portable
--
-- The current implementation is mainly, if not copy/pasted, inspired from
-- `memory`'s Parser.
--
-- Foundation Parser makes use of the Foundation's @Collec... | vincenthz/hs-foundation | foundation/Foundation/Parser.hs | bsd-3-clause | 19,244 | 0 | 20 | 5,560 | 5,510 | 2,816 | 2,694 | -1 | -1 |
{-# LANGUAGE BangPatterns, CPP, GeneralizedNewtypeDeriving, OverloadedStrings,
Rank2Types, RecordWildCards, TypeFamilies #-}
-- |
-- Module : Data.Attoparsec.Internal.Types
-- Copyright : Bryan O'Sullivan 2007-2015
-- License : BSD3
--
-- Maintainer : bos@serpentine.com
-- Stability : experimenta... | beni55/attoparsec | Data/Attoparsec/Internal/Types.hs | bsd-3-clause | 8,092 | 0 | 15 | 2,146 | 2,077 | 1,141 | 936 | 163 | 1 |
module ListQual (boo) where
{-@ qualif BadAppend(v:[a], xs:[a], ys:[a]): len v = len xs + len ys @-}
append [] ys = ys
append (x:xs) ys = x : append xs ys
{-@ boo :: {v:[Int] | len v = 2} @-}
boo :: [Int]
boo = append [1] [2]
| ssaavedra/liquidhaskell | tests/pos/listqual.hs | bsd-3-clause | 233 | 0 | 7 | 57 | 73 | 41 | 32 | 5 | 1 |
{-|
Module : IRTS.DumpBC
Description : Serialise Idris to its IBC format.
License : BSD3
Maintainer : The Idris Community.
-}
module IRTS.DumpBC where
import Idris.Core.TT
import IRTS.Bytecode
import IRTS.Simplified
import Data.List
interMap :: [a] -> [b] -> (a -> [b]) -> [b]
interMap xs y f = concat (int... | kojiromike/Idris-dev | src/IRTS/DumpBC.hs | bsd-3-clause | 3,256 | 0 | 17 | 943 | 1,289 | 632 | 657 | 67 | 23 |
module String where
main = putStrLn str where str = "hello, world"
| kmate/HaRe | old/testing/introNewDef/String_AstOut.hs | bsd-3-clause | 68 | 0 | 6 | 13 | 19 | 11 | 8 | 2 | 1 |
-- We can use Template Haskell (TH) to generate instances of the
-- FromJSON and ToJSON classes automatically. This is the fastest way
-- to add JSON support for a type.
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
import Data.Aeson (decode, encode)
import Data.Aeson.TH (deriveJSON, defaultOp... | plaprade/aeson | examples/TemplateHaskell.hs | bsd-3-clause | 716 | 1 | 10 | 136 | 156 | 84 | 72 | 14 | 1 |
{-# LANGUAGE TemplateHaskell, QuasiQuotes #-}
{-# LANGUAGE TypeFamilies, EmptyDataDecls, GADTs #-}
{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
module Main where
import qualified Database.Redis as R
import Database.Persist
import Database.Persist.Redis
import Database.Persis... | jasonzoladz/persistent | persistent-redis/tests/basic-test.hs | mit | 1,385 | 0 | 13 | 300 | 426 | 215 | 211 | 36 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. Th... | chjp2046/fbthrift | thrift/lib/hs/Thrift.hs | apache-2.0 | 3,765 | 0 | 13 | 784 | 831 | 458 | 373 | 80 | 3 |
module T5664 where
import Foreign
import Foreign.C
data D = D
newtype I = I CInt
foreign import ccall "dynamic"
mkFun1 :: FunPtr (CInt -> IO ()) -> CInt -> IO ()
foreign import ccall "dynamic"
mkFun2 :: FunPtr (I -> IO ()) -> CInt -> IO ()
foreign import ccall "dynamic"
mkFun3 :: FunPtr (D -> IO ()) -> CInt ... | urbanslug/ghc | testsuite/tests/ffi/should_fail/T5664.hs | bsd-3-clause | 569 | 0 | 11 | 123 | 249 | 128 | 121 | 17 | 0 |
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
module Unison.Codebase.Editor.SlurpResult where
import Unison.Prelude
import Unison.Codebase.Editor.SlurpComponent (SlurpComponent(..))
import Unison.Name ( Name )
import Unison.Parser (... | unisonweb/platform | parser-typechecker/src/Unison/Codebase/Editor/SlurpResult.hs | mit | 15,671 | 0 | 28 | 4,664 | 3,916 | 2,043 | 1,873 | -1 | -1 |
-- Copyright 2015 Ian D. Bollinger
--
-- Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-- http://www.apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT
-- or http://opensource.org/licenses/MIT>, at your option. This file may not be
-- copied, modified, or distributed except according t... | ianbollinger/nomegen | cli/Nomegen/CLI.hs | mit | 2,723 | 0 | 16 | 658 | 665 | 358 | 307 | 71 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Unison.Test.TypeParser where
import Test.Tasty
import Unison.Parser (Result(..))
import Unison.Parsers (parseType)
import Unison.Type (Type)
import qualified Unison.Type as T
-- import Test.Tasty.SmallCheck as SC
-... | nightscape/platform | shared/tests/Unison/Test/TypeParser.hs | mit | 1,605 | 0 | 13 | 455 | 550 | 306 | 244 | 38 | 2 |
--The MIT License (MIT)
--
--Copyright (c) 2016-2017 Steffen Michels (mail@steffen-michels.de)
--
--Permission is hereby granted, free of charge, to any person obtaining a copy of
--this software and associated documentation files (the "Software"), to deal in
--the Software without restriction, including without limita... | SteffenMichels/IHPMC | src/Interval.hs | mit | 7,929 | 0 | 16 | 2,374 | 2,168 | 1,139 | 1,029 | 159 | 15 |
{-# LANGUAGE InstanceSigs #-}
{-# OPTIONS
-Wall
-Wno-missing-signatures
-Wno-type-defaults
#-}
module Main where
import Data.Semigroup
-- Сегодня у нас аппликативные функторы
{-
class Functor f => Applicative f where
pure :: a -> f a
(<*>) :: f (a -> b) -> f a -> f b
-- Т.е. внутри функтора не пр... | aquatir/remember_java_api | code-sample-haskell/typed_fp_basics_cource/06_applicative/code.hs | mit | 2,593 | 0 | 13 | 728 | 849 | 439 | 410 | 56 | 2 |
--------------------------------------------------------------------------------
-- | Data types for logging
{-# LANGUAGE OverloadedStrings #-}
module Web.SocketIO.Types.Log (Log(..), Serializable(..)) where
--------------------------------------------------------------------------------
import System.Console.ANSI
im... | banacorn/socket.io-haskell | Web/SocketIO/Types/Log.hs | mit | 1,282 | 0 | 11 | 220 | 299 | 161 | 138 | 16 | 1 |
{-# LANGUAGE EmptyDataDecls,
FlexibleContexts,
GADTs,
GeneralizedNewtypeDeriving,
MultiParamTypeClasses,
OverloadedStrings,
QuasiQuotes,
TemplateHaskell,
TypeFamilies #-}
module Scarlet.Ent... | rhwlo/Scarlet | src/Scarlet/Entry.hs | mit | 764 | 0 | 7 | 269 | 71 | 44 | 27 | 17 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.