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 Folgerhs.Animate (animation) where
import System.Exit
import Data.Function (on)
import Data.Maybe
import Data.Array
import Data.List
import Data.Maybe (fromMaybe)
import Graphics.Gloss as G
import Graphics.Gloss.Data.Vector
import Graphics.Gloss.Interface.IO.Game
import Graphics.Gloss.Interface.Environment
i... | SU-LOSP/folgerhs | app/Folgerhs/Animate.hs | gpl-3.0 | 6,030 | 0 | 15 | 2,209 | 2,455 | 1,294 | 1,161 | 113 | 3 |
module Application.Game.Engine where
import Application.Game.Logic (eventHandler)
import Middleware.FreeGame.Environment (runEnvironment, EnvironmentInfo(..))
import View.Logic (runGameStep)
import View.View (drawState)
ticksPerSecond = 10
runEngine state = runEnvironment ticksPerSecond info
where info = Environ... | EPashkin/gamenumber-freegame | src/Application/Game/Engine.hs | gpl-3.0 | 370 | 0 | 7 | 40 | 90 | 53 | 37 | 8 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE StandaloneDeriving #-}
module Tic.ImageCoord where
import Control.Lens(makeLenses)
import ClassyPrelude
data ImageCoord a = ImageCoord {
_imx :: a
, _imy :: a
} deriving(Functor)
deriving instance Eq a => Eq (ImageCoord a)
deriving ... | pmiddend/tic | lib/Tic/ImageCoord.hs | gpl-3.0 | 387 | 0 | 8 | 64 | 105 | 58 | 47 | 13 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Lamdu.GUI.ExpressionEdit.LambdaEdit
( make
) where
import qualified Control.Lens as Lens
import Control.Lens.Operators
import Control.MonadA (MonadA)
import qualified Graphics.UI.Bottle.Widget as Widget
import qualified Lamdu.GUI.ExpressionEdit.Bind... | rvion/lamdu | Lamdu/GUI/ExpressionEdit/LambdaEdit.hs | gpl-3.0 | 2,106 | 0 | 17 | 484 | 490 | 276 | 214 | -1 | -1 |
module Hinance.User.Data (
addtagged, canmerge, canxfer, patched,
planfrom, planto, planned, slices, tagged
) where
import Hinance.User.Tag
import Hinance.User.Type
import Hinance.Bank.Type
import Hinance.Shop.Type
import Hinance.Currency
blue = "#337AB7"
cyan = "#5BC0DE"
green = "#5CB85C"
grey = "#777"
red = "#D9... | hinance/hinance | src/default/user_data.hs | gpl-3.0 | 2,213 | 0 | 11 | 413 | 887 | 520 | 367 | 66 | 1 |
module Language.Mulang.Generator (
boundDeclarations,
boundDeclarators,
declarators,
declarations,
declarationsOf,
declaredIdentifiers,
mainDeclaredIdentifiers,
equationBodies,
expressions,
referencedIdentifiers,
identifierReferences,
transitiveReferencedIdentifiers,
equationsExpressions,
st... | mumuki/mulang | src/Language/Mulang/Generator.hs | gpl-3.0 | 6,368 | 0 | 12 | 1,550 | 1,836 | 983 | 853 | 110 | 17 |
{-# LANGUAGE BangPatterns, MultiParamTypeClasses, OverloadedStrings, TemplateHaskell, TypeFamilies, TypeOperators #-}
{- |
Module : Milkman.Context
License : GPL-3
Stability : experimental
Portability : unknown
Basic algorithms and utilities for formal contexts
-}
module Milkman.Context ( Concept
... | mmarx/milkman | src/Milkman/Context.hs | gpl-3.0 | 14,777 | 0 | 18 | 6,731 | 3,837 | 2,059 | 1,778 | 273 | 5 |
module RayMarch.Run where
import Data.Maybe
import Control.Monad.Trans.State
import Codec.Picture hiding (Pixel)
import RayMarch.Types
import RayMarch.March
import RayMarch.Quaternion
import Debug.Trace (trace)
runMarcher :: Config -> World s -> IO ()
runMarcher cfg wld = savePngImage (fileName cfg) $ ImageRGB8 img ... | phi16/RayMarch | RayMarch/Run.hs | gpl-3.0 | 1,060 | 0 | 21 | 246 | 539 | 275 | 264 | 28 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.Analytics.T... | brendanhay/gogol | gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs | mpl-2.0 | 353,479 | 0 | 38 | 90,398 | 72,242 | 41,502 | 30,740 | 7,927 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-servicenetworking/gen/Network/Google/Resource/ServiceNetworking/Services/Projects/Global/Networks/Get.hs | mpl-2.0 | 6,014 | 0 | 15 | 1,231 | 711 | 421 | 290 | 108 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-doubleclick-bids/gen/Network/Google/Resource/DoubleClickBidManager/Queries/GetQuery.hs | mpl-2.0 | 4,569 | 0 | 17 | 1,081 | 722 | 419 | 303 | 104 | 1 |
module Mean where
mean :: (Integral a, Fractional b) => [a] -> b
mean a = (fromIntegral $ sum a) / (fromIntegral $ length a)
| ice1000/OI-codes | codewars/1-100/thats-mean.hs | agpl-3.0 | 126 | 0 | 8 | 26 | 63 | 34 | 29 | 3 | 1 |
{-
Copyright (C) 2009 Andrejs Sisojevs <andrejs.sisojevs@nextmail.ru>
All rights reserved.
For license and copyright information, see the file COPYRIGHT
-}
--------------------------------------------------------------------------
--------------------------------------------------------------------------
-- | This ... | Andrey-Sisoyev/haskell-PCLT | Text/PCLT.hs | lgpl-2.1 | 3,999 | 0 | 5 | 710 | 243 | 196 | 47 | 23 | 0 |
-- when (Control.Monad)
-- takes a Bool and an I/O action. If that Bool value is true, it returns the same
-- I/O action that we supplied to it. However, if it's False, it returns the
-- return () action, which doesn't do anything
import Control.Monad
main = do
input <- getLine
when (input == "SWORDFISH") $ ... | Ketouem/learn-you-a-haskell | src/chapter-8-input-and-output/useful-io-fns/when.hs | unlicense | 485 | 1 | 11 | 123 | 55 | 29 | 26 | 5 | 1 |
{-# LANGUAGE BangPatterns #-}
module Main where
import Prelude hiding (concat, filter)
import qualified Data.Alpino.Model as AM
import Data.Alpino.Model.Conduit
import Data.Conduit (Sink, runResourceT, ($=), ($$))
import qualified Data.Conduit.Binary as CB
import qualified Data.Conduit.List as CL
import Data.List (g... | danieldk/alpino-tools | utils/model_statistics_data.hs | apache-2.0 | 995 | 0 | 15 | 187 | 325 | 184 | 141 | 25 | 1 |
doubleMe x = x + x
doubleSmallNumber x =
if x > 100
then x
else x*2
lostNumbers = [4,8,15,16,23,42]
| Kermit95/Playground | lang/haskell/haskell_tut4.hs | apache-2.0 | 108 | 1 | 6 | 28 | 62 | 34 | 28 | 6 | 2 |
{-# LANGUAGE TemplateHaskell #-}
-- https://ocharles.org.uk/blog/guest-posts/2014-12-22-template-haskell.html
import Th04
import Language.Haskell.TH
primes= $(primeQ 0 2390)
main = do
runQ [d| x= 5|] >>= print
runQ [t| Int |] >>= print
runQ [p|(x,y)|] >>= print
print $ length $ primes
| egaburov/funstuff | Haskell/thsk/th04.hs | apache-2.0 | 298 | 1 | 8 | 50 | 91 | 48 | 43 | 9 | 1 |
import Prelude
dropEvery :: [a] -> Int -> [a]
dropEvery [] _ = []
dropEvery xs n = (take (n - 1) xs) ++ dropEvery (drop n xs) n
| 2dor/99-problems-Haskell | 11-20-lists-continued/problem-16.hs | bsd-2-clause | 129 | 0 | 9 | 30 | 79 | 41 | 38 | 4 | 1 |
{-# LANGUAGE FlexibleContexts, ScopedTypeVariables #-}
-- hexpat, a Haskell wrapper for expat
-- Copyright (C) 2008 Evan Martin <martine@danga.com>
-- Copyright (C) 2009 Stephen Blackheath <http://blacksapphire.com/antispam>
-- | This module provides functions to format a tree
-- structure or SAX stream as UTF-8 encod... | the-real-blackh/hexpat | Text/XML/Expat/Format.hs | bsd-3-clause | 14,996 | 0 | 24 | 4,920 | 3,772 | 1,914 | 1,858 | 296 | 15 |
import Triangle
main :: IO ()
main = print $ filter (\x -> isTriangle x && isPent x) hexas !! 2
| stulli/projectEuler | eu45.hs | bsd-3-clause | 97 | 1 | 11 | 22 | 53 | 25 | 28 | 3 | 1 |
[ BlockComment
[ "/*"
, "*/"
], Space " ", Token "#", Space " ",
BlockComment
[ "/*"
, "*/"
], Space " ", Token "define", Space " ", Token "FOO", Space " ", Token "1020"
, NewLine
]
| mkovacs/language-c-preproc | resources/test-small-2.out.hs | bsd-3-clause | 196 | 0 | 7 | 53 | 85 | 44 | 41 | -1 | -1 |
module Evaluator (
evaluate
) where
import Base
termMap :: (Int -> Int -> Term) -> Term -> Term
termMap onvar t = go 0 t
where
go index (TermVar var) = onvar index var
go index (TermIfThenElse t1 t2 t3) = TermIfThenElse (go index t1) (go index t2) (go index t3)
go index (TermAbs var ty t) = TermAbs va... | foreverbell/unlimited-plt-toys | tapl/simplebool/Evaluator.hs | bsd-3-clause | 1,783 | 0 | 11 | 385 | 681 | 341 | 340 | 34 | 6 |
{-# LANGUAGE OverloadedStrings #-}
module Hakyll.Convert.IO where
import qualified Data.ByteString as B
import Data.Maybe (fromJust)
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import Data.Time.Format (defaultTimeLocale, formatTime)
import Hakyll.Convert.Common (DistilledPost (..))
import... | kowey/hakyll-convert | src/Hakyll/Convert/IO.hs | bsd-3-clause | 1,649 | 0 | 14 | 345 | 460 | 252 | 208 | 35 | 2 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
-- |
module Libtorrent.TorrentInfoSpec where
import Test.Hspec
import Libtorrent.Exceptions
import Libtorrent.TorrentInfo
spec :: Spec
spec = do
describe "Torrent info" $ do
it "read from nonexistent file" $
newTorrentInfo "aaa" `shou... | eryx67/haskell-libtorrent | test/Libtorrent/TorrentInfoSpec.hs | bsd-3-clause | 610 | 0 | 15 | 190 | 109 | 58 | 51 | 16 | 2 |
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module HSync.Common.FileVersion where
import Data.Aeson.TH
import ClassyPrelude.Yesod
import Control.Lens
import HSync.Common.Types
import Data.Semi... | noinia/hsync-common | src/HSync/Common/FileVersion.hs | bsd-3-clause | 3,744 | 0 | 10 | 1,002 | 783 | 419 | 364 | -1 | -1 |
{-# LANGUAGE QuasiQuotes #-}
import LiquidHaskell
import Data.Set
[lq| measure foo |]
[lq| measure foo1 |]
data F a = F a | E
foo1 :: F a -> Set a
foo1 (F x) = singleton x
foo1 E = empty
foo :: F Int -> Int
foo (F x) = x + 1
foo E = 0
-- bar = F
| spinda/liquidhaskell | tests/gsoc15/unknown/pos/MeasureSets.hs | bsd-3-clause | 266 | 2 | 10 | 82 | 125 | 62 | 63 | 12 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Mismi.Kernel.Data (
MismiRegion (..)
, renderMismiRegion
, parseMismiRegion
) where
import P
-- | Mismi's view of available AWS regions.
data MismiRegion =
IrelandRegion -- ^ Europe / eu-west-1
| FrankfurtR... | ambiata/mismi | mismi-kernel/src/Mismi/Kernel/Data.hs | bsd-3-clause | 2,888 | 0 | 8 | 831 | 431 | 230 | 201 | 102 | 18 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Temperature.MN.Corpus
( corpus
) where
import Prelude
i... | facebookincubator/duckling | Duckling/Temperature/MN/Corpus.hs | bsd-3-clause | 942 | 0 | 11 | 269 | 184 | 109 | 75 | 23 | 1 |
module TTT.Game where
import Data.List
import Data.List.Split
import Data.Maybe
data Piece = X | O
deriving (Eq)
data Position = Position {px :: Int, py :: Int}
deriving (Show, Eq)
type Board = [(Maybe Piece, Position)]
data GameState = GameState {board :: Board, whoseTurn :: Piece}
data Result = Win | Lose |... | cjw-charleswu/Wizard | TicTacToe/src/TTT/Game.hs | bsd-3-clause | 4,098 | 0 | 16 | 914 | 1,620 | 851 | 769 | 107 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Hack2.Interface.Wai
(
hackAppToWaiApp
) where
import Control.Monad.IO.Class (liftIO)
import Data.ByteString.Char8 (ByteString, pack)
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy.Char8 as Lazy
import qualified Data.Cas... | nfjinjing/hack2-interface-wai | src/Hack2/Interface/Wai.hs | bsd-3-clause | 3,954 | 14 | 15 | 686 | 934 | 519 | 415 | 78 | 2 |
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
module Opaleye.Internal.Join where
import qualified Opaleye.Internal.HaskellDB.PrimQuery as HPQ
import qualified Opaleye.Internal.PackMap as PM
import qualified Opaleye.Internal.Tag as... | WraithM/haskell-opaleye | src/Opaleye/Internal/Join.hs | bsd-3-clause | 5,923 | 0 | 16 | 1,356 | 1,682 | 912 | 770 | -1 | -1 |
import Control.Exception
import Control.Monad
import Test.HUnit
import Board.Vector
import Board.List
import SudokuAbstract
import SimpleSolve
import Square.Simple
import Value.Integer
import Data.Maybe
import Data.Char
import ProjectEuler
import Test.QuickCheck
-- Helper function
boardToMaybeValList :: (SudokuBoard b... | Solpatium/Haskell-Sudoku | test/Spec.hs | bsd-3-clause | 4,270 | 0 | 11 | 1,390 | 897 | 469 | 428 | 70 | 1 |
{- This module provides type-level finite maps.
The implementation is similar to that shown in the paper.
"Embedding effect systems in Haskell" Orchard, Petricek 2014 -}
{-# LANGUAGE TypeOperators, PolyKinds, DataKinds, KindSignatures,
TypeFamilies, UndecidableInstances, MultiParamTypeClasses,
... | AaronFriel/eff-experiments | src/Data/Type/Map.hs | bsd-3-clause | 7,879 | 2 | 17 | 2,311 | 3,374 | 1,794 | 1,580 | -1 | -1 |
module Main where
import qualified Data.List as Lst
import Language.CCS.Data
import Language.CCS.Parser
import Language.CCS.Printer
import System.Environment(getArgs)
import Text.Parsec
import Test.QuickCheck
import Test.Framework as TF (defaultMain, testGroup, Test)
import Test.Framework.Providers.HUnit
import Test.F... | kapilash/dc | src/ccs2c/ccs2cs-lib/tests/Main.hs | bsd-3-clause | 6,641 | 0 | 15 | 1,644 | 2,520 | 1,250 | 1,270 | 200 | 2 |
module ExampleUtil where
import System.Random
import Data.List
import Data.Array.Accelerate as A
-- Takes a size and a seed to produce a list of doubles
randomlist :: Int -> StdGen -> [Double]
randomlist n = Data.List.take n . unfoldr (Just . random)
-- Takes a size and 3 seeds t... | pwoh/examples-hs | src/ExampleUtil.hs | bsd-3-clause | 1,046 | 0 | 10 | 266 | 308 | 167 | 141 | 17 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Common
( SlackMessage(..)
, MessageAcceptor
, slackPayloadWithChannel
, startMessageAcceptor
, textInMessageAcceptor
) where
import ClassyPrelude
import Data.Aeson
type MessageAcceptor = Text -> Bool
data SlackMes... | Koshroy/kokona | src/Common.hs | bsd-3-clause | 1,298 | 0 | 10 | 235 | 296 | 157 | 139 | 37 | 2 |
module PackageTests.Tests(tests) where
import PackageTests.PackageTester
import qualified PackageTests.AutogenModules.Package.Check
import qualified PackageTests.AutogenModules.SrcDist.Check
import qualified PackageTests.BenchmarkStanza.Check
import qualified PackageTests.CaretOperator.Check
import qualified PackageT... | sopvop/cabal | Cabal/tests/PackageTests/Tests.hs | bsd-3-clause | 26,614 | 86 | 26 | 6,860 | 5,009 | 2,406 | 2,603 | 444 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
module Main where
import System.Console.CmdArgs
import System.Directory (getHomeDirectory)
import System.FilePath (joinPath, splitPath, (</>))
import GitRunner
import G4Release
data CmdOptions = AboutIrt {
}
| G4Release { gitRepo :: String... | arekfu/irt | src/irt.hs | bsd-3-clause | 5,448 | 1 | 12 | 1,389 | 1,152 | 587 | 565 | 101 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- BSD-3, Ricky Elrod <ricky@elrod.me>
-- BSD-3, Maxwell Swadling <maxwellswadling@gmail.com>
-- TODO:
-- - Dryrun mode
module Network.DigitalOcean (
Authentication (..),
DOResponse (..),
Droplet (..), droplets,
... | relrod/digitalocean | src/Network/DigitalOcean.hs | bsd-3-clause | 8,298 | 0 | 18 | 1,753 | 2,869 | 1,594 | 1,275 | 237 | 1 |
module Shakefiles.Shellcheck (rules) where
import Development.Shake
import Development.Shake.Command
import Development.Shake.FilePath
import Development.Shake.Util
rules shellcheck = do
phony "shellcheck" $ need [ "_build/shellcheck.ok" ]
"_build/shellcheck.ok" %> \out -> do
scriptFiles <- getDirec... | avh4/elm-format | Shakefiles/Shellcheck.hs | bsd-3-clause | 1,132 | 0 | 16 | 311 | 224 | 115 | 109 | 27 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module TestOrdECMWithTestSequenceInvalidating (
testWithTestSequenceInvalidating
) where
import Caching.ExpiringCacheMap.OrdECM (newECMForM, lookupECM, CacheSettings(..), consistentDuration, invalidate, invalidateCache, keysCached, keysNotExpired)
import qualified Caching.Expiri... | elblake/expiring-cache-map | tests/TestOrdECMWithTestSequenceInvalidating.hs | bsd-3-clause | 4,174 | 0 | 15 | 791 | 974 | 500 | 474 | 69 | 2 |
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Test.Hspec.Json.GHCJS (
genericToJSValTests,
genericFromJSValTests,
genericAesonToJSVal,
genericJSValToAeson,
genericJSValRoundtrip,
genericAesonRoundtrip,
-- re-export
Proxy(..),
) where... | plow-technologies/ghcjs-hspec-json | src/Test/Hspec/Json/GHCJS.hs | bsd-3-clause | 5,100 | 9 | 22 | 1,184 | 1,424 | 721 | 703 | 109 | 2 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module DyNet.Expr (
-- * Input operations
input,
input'',
parameter,
lookupParameter,
constParameter,
constLookupParameter,
lookup,
-- lookup,
lookup',
-- constLookup,
constLookup',
zeroes,
... | masashi-y/dynet.hs | src/DyNet/Expr.hs | bsd-3-clause | 3,258 | 0 | 9 | 1,005 | 663 | 411 | 252 | 137 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
#ifdef TRUSTWORTHY
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module ... | hvr/lens | src/Control/Lens/Cons.hs | bsd-3-clause | 13,202 | 0 | 12 | 2,660 | 2,750 | 1,623 | 1,127 | 172 | 1 |
{-# LANGUAGE PatternGuards #-}
module Ant.Search
( SearchNode (..)
, search
, searchPath
, searchN
)
where
import qualified Data.IntSet as S
import Data.Maybe
import Data.PSQueue ( Binding(..) )
import qualified Data.PSQueue as Q
type Queue m = Q.PSQ SearchNode m
da... | Saulzar/Ants | Ant/Search.hs | bsd-3-clause | 2,063 | 0 | 14 | 656 | 757 | 401 | 356 | 44 | 2 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE... | geraldus/yesod | yesod-core/src/Yesod/Core/Handler.hs | mit | 61,845 | 0 | 20 | 14,642 | 11,866 | 6,364 | 5,502 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Qi.CLI.Dispatcher (
updateLambdas
, deployApp
, createCfStack
, updateCfStack
, describeCfStack
, destroyCfStack
, cycleStack
, printLogs
) where
import Control.Lens
import ... | ababkin/qmuli | library/Qi/CLI/Dispatcher.hs | mit | 4,996 | 0 | 14 | 1,254 | 1,281 | 673 | 608 | 130 | 1 |
module Main (main) where
import System.Environment (getEnv)
import Network.Wai.Middleware.RequestLogger (logStdoutDev)
import Web.Scotty (scotty, middleware)
import Middleware (allowCORS)
import Routes (handleRequest)
import qualified Storage as DB (setup)
main :: IO ()
main = do
DB.setup
port <- read <$> ge... | vyorkin-archive/assignment | api/src/Main.hs | mit | 436 | 0 | 10 | 88 | 130 | 71 | 59 | 15 | 1 |
module SynRec where
type A = B
type B = C
type C = D
type D = A
| roberth/uu-helium | test/staticerrors/SynRec.hs | gpl-3.0 | 65 | 0 | 4 | 20 | 28 | 19 | 9 | 5 | 0 |
module PointInPolygon where
type Point = (Double, Double)
x p = fst p
y p = snd p
tol = 0.0001
diff p1 p2 = ((x p1) - (x p2), (y p1) - (y p2))
vmod p = sqrt ((x p) * (x p) + (y p) * (y p))
vdot p1 p2 = (x p1) * (x p2) + (y p1) * (y p2)
angle p1 p2 = acos ((vdot p1 p2) / ((vmod p1) * (vmod p2)))
feq x y = abs (x - ... | lisphacker/codewars | PointInPolygon_flymake.hs | bsd-2-clause | 981 | 0 | 11 | 414 | 485 | 246 | 239 | 20 | 1 |
{-# OPTIONS -Wall -Werror #-}
module Main where
import Data.Time.Calendar.MonthDay
showCompare :: (Eq a,Show a) => a -> String -> a -> String
showCompare a1 b a2 | a1 == a2 = (show a1) ++ " == " ++ b
showCompare a1 b a2 = "DIFF: " ++ (show a1) ++ " -> " ++ b ++ " -> " ++ (show a2)
main :: IO ()
main = mapM_ (\isLea... | takano-akio/time | test/TestMonthDay.hs | bsd-3-clause | 602 | 0 | 21 | 133 | 280 | 143 | 137 | 16 | 2 |
{-# LANGUAGE CPP, DeriveDataTypeable, MultiParamTypeClasses, FlexibleInstances, ScopedTypeVariables #-}
-- |
-- Module : Data.Vector.Storable.Mutable
-- Copyright : (c) Roman Leshchinskiy 2009-2010
-- License : BSD-style
--
-- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au>
-- Stability : experiment... | seckcoder/vector | Data/Vector/Storable/Mutable.hs | bsd-3-clause | 16,467 | 0 | 22 | 3,905 | 3,857 | 2,092 | 1,765 | 277 | 5 |
module Lambda1 where
zip' = zipWith (\a b -> (a,b))
| charleso/intellij-haskforce | tests/gold/parser/Lambda00001.hs | apache-2.0 | 53 | 0 | 8 | 11 | 28 | 17 | 11 | 2 | 1 |
{-# OPTIONS_GHC -Wall #-}
module Canonicalize.Sort (definitions) where
import Control.Monad.State
import Control.Applicative ((<$>),(<*>))
import qualified Data.Graph as Graph
import qualified Data.Map as Map
import qualified Data.Maybe as Maybe
import qualified Data.Set as Set
import AST.Expression.General (Expr'(..... | JoeyEremondi/elm-summer-opt | src/Canonicalize/Sort.hs | bsd-3-clause | 6,335 | 0 | 19 | 1,910 | 1,958 | 997 | 961 | 148 | 20 |
no = \x -> f x (g x) | bitemyapp/apply-refact | tests/examples/Default33.hs | bsd-3-clause | 20 | 0 | 8 | 7 | 22 | 11 | 11 | 1 | 1 |
module A5 where
data Data1 b a = C1 a Int Char | C2 Int | C3 b Float
f :: (Data1 b a) -> Int
f (C1 a b c) = b -- errorData "b" "Data.C1" "f"
f (C2 a) = a
f (C3 c3_1 a) = 42
g (C1 (C1 x y z) b c) = y
h :: Data1 b a
h = C2 42 | kmate/HaRe | old/testing/addField/A5_TokOut.hs | bsd-3-clause | 227 | 0 | 9 | 71 | 143 | 76 | 67 | 9 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module OutputM (module IxOutputM, F.HasOutput, outputTree, output, outputs)
where
import IxOutputM hiding (HasOutput(..))
import qualified MT as F
import Tree
outputTree :: F.HasOutput m F.Z o => Tree o -> m ()
output :: F.HasOutput m F.Z o => o -> m ()
outputs :: F.HasOutput m ... | kmate/HaRe | old/tools/base/lib/Monads/OutputM.hs | bsd-3-clause | 438 | 0 | 8 | 89 | 176 | 96 | 80 | 11 | 1 |
module PropLexer(module PropLexer{-,LexerFlags(..)-}) where
--import LexerOptions
import HsLexerPass1(lexerPass0,lexerPass0',startPos)
import HsTokens
{-+
This module defines the lexical analyser for the P-logic extension of Haskell.
Differences from the plain Haskell 98 lexical syntax:
- The identifiers "assert" ... | forste/haReFork | tools/property/parse2/PropLexer.hs | bsd-3-clause | 1,185 | 4 | 19 | 242 | 245 | 137 | 108 | 18 | 6 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.ParserCombinators.Parsec
-- Copyright : (c) Paolo Martini 2007
-- License : BSD-style (see the LICENSE file)
--
-- Maintainer : derek.a.elkins@gmail.com
-- Stability : provisional
-- Portability : po... | maurer/15-411-Haskell-Base-Code | src/Text/ParserCombinators/Parsec.hs | bsd-3-clause | 1,229 | 0 | 5 | 185 | 135 | 99 | 36 | 18 | 0 |
module Tests.Writers.Docx (tests) where
import Text.Pandoc.Options
import Text.Pandoc.Readers.Native
import Text.Pandoc.Definition
import Tests.Helpers
import Test.Framework
import Text.Pandoc.Readers.Docx
import Text.Pandoc.Writers.Docx
import Text.Pandoc.Error
type Options = (WriterOptions, ReaderOptions)
compareO... | gbataille/pandoc | tests/Tests/Writers/Docx.hs | gpl-2.0 | 4,350 | 0 | 13 | 1,427 | 621 | 328 | 293 | 115 | 1 |
{-# LANGUAGE UndecidableInstances, FlexibleInstances,
MultiParamTypeClasses, FunctionalDependencies #-}
-- UndecidableInstances now needed because the Coverage Condition fails
-- Hugs failed this functional-dependency test
-- Reported by Iavor Diatchki Feb 05
module ShouldCompile where
data N0
newtype S... | spacekitteh/smcghc | testsuite/tests/typecheck/should_compile/tc187.hs | bsd-3-clause | 854 | 0 | 11 | 214 | 239 | 130 | 109 | -1 | -1 |
import Data.Array
properDividers' n q
| n < q² = []
| n == q² = [q]
| otherwise = if (n == q * r) then q : r : properDividers' n (q+1)
else properDividers' n (q+1)
where q² = q * q; r = quot n q
properDividers :: Int -> [Int]
properDividers n = 1 : (properDivid... | dpieroux/euler | 0/0023.hs | mit | 939 | 6 | 16 | 293 | 431 | 228 | 203 | -1 | -1 |
import System.Random (newStdGen, StdGen)
import Graphics.Gloss
import qualified Graphics.Gloss.Interface.IO.Game as G
import Graphics.Gloss.Interface.FRP.Yampa
import FRP.Yampa (Event(..), SF, arr, tag, (>>>))
import Types
import Game
import Rendering
-- | Our game uses up, down, left and right arrows to make the mov... | ksaveljev/yampa-2048 | src/Main.hs | mit | 1,580 | 0 | 15 | 306 | 421 | 233 | 188 | 28 | 5 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-as-lifecyclehook.html
module Stratosphere.Resources.AutoScalingLifecycleHook where
import Stratosphere.Resourc... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/AutoScalingLifecycleHook.hs | mit | 5,716 | 0 | 15 | 569 | 825 | 466 | 359 | 61 | 1 |
module GHCJS.DOM.FileReaderSync (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/FileReaderSync.hs | mit | 44 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
module Codewars.Kata.Sheep where
countSheep :: [Bool] -> Int
countSheep (x:xs) = count + countSheep xs
where count = if x == True then 1 else 0
countSheep [] = 0
| dzeban/haskell-exercises | countSheep.hs | mit | 169 | 0 | 8 | 37 | 70 | 39 | 31 | 5 | 2 |
module ZoomHub.Debug
( spy,
)
where
import qualified Debug.Trace as Trace
spy :: Show a => String -> a -> a
spy tag x = Trace.trace (tag <> ": " <> show x) x
| zoomhub/zoomhub | src/ZoomHub/Debug.hs | mit | 164 | 0 | 8 | 40 | 71 | 39 | 32 | 5 | 1 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module Plug (
usesDefaultPort,
withScheme,
withCredentials,
withoutCredentials,
withHostname,
withPort,
withTrailingSlash,
withoutTrailingSlash,
at,
with,
with',
without,
withParams,
without... | bjorg/HPlug | plug.hs | mit | 7,821 | 0 | 12 | 1,616 | 2,683 | 1,461 | 1,222 | 155 | 2 |
{-# LANGUAGE TupleSections, OverloadedStrings #-}
module Handler.Home where
import Import
-- This is a handler function for the GET request method on the HomeR
-- resource pattern. All of your resource patterns are defined in
-- config/routes
--
-- The majority of the code you will write in Yesod lives in these handl... | losvedir/style-guidance | Handler/Home.hs | mit | 1,591 | 0 | 13 | 358 | 403 | 208 | 195 | 35 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Test.Hspec.WaiSpec (main, spec) where
import Test.Hspec
import Data.ByteString (ByteString)
import qualified Data.ByteString.Lazy as BL
import Network.HTTP.Types
import Network.Wai
import Test.Hspec.Wai
import Test.H... | hspec/hspec-wai | test/Test/Hspec/WaiSpec.hs | mit | 2,436 | 0 | 19 | 534 | 741 | 368 | 373 | 55 | 1 |
{-# htermination maximum :: [Int] -> Int #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_maximum_5.hs | mit | 45 | 0 | 2 | 8 | 3 | 2 | 1 | 1 | 0 |
{-# LANGUAGE
OverloadedStrings
, TypeApplications
, LambdaCase
, NoMonomorphismRestriction
#-}
module CommandInstall
( cmdInstall
, updateGrubConf
) where
import Algorithms.NaturalSort
import Control.Exception
import Control.Monad
import Data.List
import Data.Ord
import System.Environment
import Syst... | Javran/misc | kernel-tool/src/CommandInstall.hs | mit | 3,059 | 0 | 19 | 636 | 772 | 400 | 372 | 76 | 3 |
import System.Environment
import System.Directory
import System.IO
import Data.List
type TaskAction = [String] -> IO ()
dispatch :: [ ( String, TaskAction ) ]
dispatch = [ ("add", add)
, ("view", view)
, ("remove", remove)
]
main = do
(command:args) <- getArgs
let ... | feliposz/learning-stuff | haskell/task_original.hs | mit | 1,189 | 0 | 16 | 296 | 384 | 194 | 190 | 35 | 1 |
{-|
Module: Parse
The module to parse lisp expressions.
-}
module Parse (lispParse, obj, objs) where
import Lexer
import Representation
import Text.Parsec.Combinator
import Text.Parsec.Error
import Text.Parsec.Pos
import Text.Parsec.Prim
type Parser = Parsec [LexOut] ()
match :: Token -> Parser ()
match tok = t... | lambda-11235/pure-hlisp | src/Parse.hs | gpl-2.0 | 1,306 | 0 | 11 | 304 | 456 | 237 | 219 | 32 | 2 |
-- yaht_5_1.hs
module Main
where
{-
Exercise 5.1 Write a program that asks the user for his or her name. If the
name is one of Simon, John or Phil, tell the user that you think Haskell is
a great programming language. If the name is Koen, tell them that you think
debugging Haskell is fun (Koen Classen is one of ... | dormouse/blog | source/haskell/yaht-exercises/yaht_5_1.hs | gpl-2.0 | 1,248 | 0 | 10 | 314 | 76 | 36 | 40 | 10 | 5 |
-- C->Haskell Compiler: C builtin information
--
-- Author : Manuel M. T. Chakravarty
-- Created: 12 February 01
--
-- Copyright (c) 2001 Manuel M. T. Chakravarty
--
-- This file is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the... | jrockway/c2hs | src/C2HS/C/Builtin.hs | gpl-2.0 | 1,438 | 0 | 7 | 222 | 105 | 79 | 26 | 6 | 1 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the Lice... | karamellpelle/grid | designer/source/MEnv/Sound/GLFW.hs | gpl-3.0 | 802 | 0 | 3 | 151 | 31 | 27 | 4 | 3 | 0 |
import Data.List
-- Project euler problem 2
-- Find the sum of all even-valued fibonacci numbers not exceeding 4 million
main = putStrLn $ show result
where
result = sum [ x | x <- (takeWhile (<=4000000) fibonacci), x `mod` 2 == 0 ]
fibonacci :: [Int]
fibonacci = fibonacci' 0 1
fibonacci' :: Int -> Int -... | peri4n/projecteuler | haskell/problem2.hs | gpl-3.0 | 374 | 0 | 13 | 83 | 137 | 75 | 62 | 7 | 1 |
{-# LANGUAGE GADTs #-}
module AVR.REPL where
import AVR.Decoder (decode, Instruction)
import AVR.Fetch (fetch)
import AVR.Exec (exec)
import AVR.AVRState
import Data.Word (Word16)
import Data.Vector (Vector)
import System.Console.Readline
import System.Exit
import AVR.REPL.Command
import AVR.REPL.Expr
import Contr... | dhrosa/haskell-avr-simulator | AVR/REPL.hs | gpl-3.0 | 3,214 | 0 | 23 | 1,060 | 1,004 | 513 | 491 | 63 | 14 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
-- | Recognises zip archives and adds their content to the database.
module Handler.Upload.Archive (
ArchiveTree (..), extensions, processArchive, archiveTree, treeToHtml
) where
import Import
import qualified Control.Exception as E
import Control.Mona... | RaphaelJ/getwebb.org | Handler/Upload/Archive.hs | gpl-3.0 | 5,129 | 7 | 39 | 1,745 | 1,192 | 642 | 550 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
-- | Example of using lenses for manipulating a configuration file.
module Config where
import Control.Lens
data Config = Config
{ verbose :: Bool
, authors :: [Author]
, foo :: Foo
} deriving (Show)
data Author = Author
{ name :: String
, age :: Int
} derivi... | capitanbatata/sandbox | pw-lenses/src/Config.hs | gpl-3.0 | 4,085 | 0 | 9 | 896 | 644 | 389 | 255 | 39 | 1 |
type Exp a b = Lan ((,) a) I b | hmemcpy/milewski-ctfp-pdf | src/content/3.11/code/haskell/snippet07.hs | gpl-3.0 | 30 | 0 | 8 | 9 | 25 | 14 | 11 | 1 | 0 |
-- Copyright (c) 2015, Sven Thiele <sthiele78@gmail.com>
-- This file is part of hasple.
-- hasple is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) an... | sthiele/hasple | CDNLSolver.hs | gpl-3.0 | 12,660 | 0 | 24 | 5,447 | 2,898 | 1,510 | 1,388 | 208 | 6 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Edits/ExpansionFiles/Get.hs | mpl-2.0 | 4,859 | 0 | 18 | 1,101 | 561 | 331 | 230 | 92 | 1 |
module Kth where
import Prelude hiding ((!!))
elementAt :: [a] -> Int -> a
elementAt ls 1 = head ls
elementAt ls n = elementAt (tail ls) (n - 1)
| ice1000/OI-codes | codewars/101-200/find-the-kth-element-of-a-list.hs | agpl-3.0 | 146 | 0 | 7 | 31 | 72 | 40 | 32 | 5 | 1 |
{-# LANGUAGE BangPatterns,OverloadedStrings #-}
module BSParse
( consumed
, tryGet
, getPred
, getPred1
, wrapWith
, parseLit
, parseMany
, parseMany1
, parseOneOf
, parseNoneOf
, parseStr
, parseLen
, parseBlock
, parseCharPred
, chain
, choose
, pass
, sepBut
, sepBut1
, parseEof
, safeHead
, ea... | tolysz/hiccup | BSParse.hs | lgpl-2.1 | 11,190 | 0 | 14 | 2,916 | 2,553 | 1,406 | 1,147 | 196 | 3 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
module Spark.Core.ColumnSpec where
import Test.Hspec
import Data.List.NonEmpty(NonEmpty( (:|) ))
import Spark.Core.Context
import Spark.Core.Dataset
import Spark.Core.Column
import Spark.Core.Row
import Spark.Core.Functions
import qualified Sp... | tjhunter/karps | haskell/test-integration/Spark/Core/ColumnSpec.hs | apache-2.0 | 1,919 | 0 | 19 | 457 | 704 | 361 | 343 | 52 | 1 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
--------------------------------------------------------------------------------
-- This code is generated by util/genC.hs.
--------------------------------------------------------------------------------
module Graphics.UI.GLFW.C where
--------------------... | Peaker/GLFW-b | Graphics/UI/GLFW/C.hs | bsd-2-clause | 20,750 | 0 | 10 | 4,164 | 5,255 | 2,543 | 2,712 | 499 | 0 |
-- |
-- Module : Text.Megaparsec
-- Copyright : © 2015 Megaparsec contributors
-- © 2007 Paolo Martini
-- © 1999–2001 Daan Leijen
-- License : BSD3
--
-- Maintainer : Mark Karpov <markkarpov@opmbx.org>
-- Stability : experimental
-- Portability : portable
--
-- This mod... | neongreen/megaparsec | Text/Megaparsec.hs | bsd-2-clause | 4,304 | 0 | 5 | 964 | 447 | 326 | 121 | 105 | 0 |
module Toy.Exp.Util
( arithspoon
, boolL
, asToBool
, binResToBool
) where
import Control.DeepSeq (NFData)
import Control.Exception (ArithException, Handler (..))
import Control.Lens (Iso', from, iso)
import Control.Monad.Error.... | Martoon-00/toy-compiler | src/Toy/Exp/Util.hs | bsd-3-clause | 1,246 | 0 | 10 | 388 | 375 | 209 | 166 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE BangPatterns
, CPP
, ExistentialQuantification
, NoImplicitPrelude
, RecordWildCards
, TypeSynonymInstances
, FlexibleInstances
#-}
-- |
-- The event manager supports event notification on fds. Each fd may
-- ... | forked-upstream-packages-for-ghcjs/ghc | libraries/base/GHC/Event/Manager.hs | bsd-3-clause | 17,142 | 0 | 27 | 4,467 | 3,671 | 1,841 | 1,830 | -1 | -1 |
module JDec.Class.Typesafe.FieldRef (
FieldRef(FieldRef),
fieldClass,
fieldNameAndType
) where
import JDec.Class.Typesafe.FieldNameAndType(FieldNameAndType())
import Data.Text(Text)
-- | A reference to a class or interface field
data FieldRef = FieldRef {
fieldClass :: Text, -- ^ A class or interface type that has... | rel-eng/jdec | src/JDec/Class/Typesafe/FieldRef.hs | bsd-3-clause | 442 | 0 | 8 | 66 | 75 | 50 | 25 | 12 | 0 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Quantity.KM.Corpus
( corpus
) where
import Data.String
i... | facebookincubator/duckling | Duckling/Quantity/KM/Corpus.hs | bsd-3-clause | 2,511 | 0 | 11 | 657 | 368 | 211 | 157 | 47 | 1 |
module Main (main) where
import GeekBar
main :: IO ()
main = putStrLn "Nothing is implemented, yet!"
| aslpavel/geekbar | Main.hs | bsd-3-clause | 103 | 0 | 6 | 19 | 30 | 17 | 13 | 4 | 1 |
module Main(main) where
-- we need function pointer type and free function
import Foreign.Ptr(FunPtr, freeHaskellFunPtr)
foreign import ccall output :: Int -> IO ()
-- a "wrapper" import gives a factory for converting a Haskell function to a foreign function pointer
foreign import ccall "wrapper" wrap :: (Int -> Int... | bosu/josh | t/progs/Callback.hs | bsd-3-clause | 883 | 0 | 11 | 217 | 216 | 112 | 104 | 16 | 1 |
{-# LANGUAGE
ConstraintKinds
, EmptyDataDecls
, FlexibleContexts
, FlexibleInstances
, ScopedTypeVariables
, StandaloneDeriving
, TypeFamilies
#-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.UI.Toy.Gtk
-- Copyright : (c) 2011 Mich... | mgsloan/toy-gtk | src/Graphics/UI/Toy/Gtk.hs | bsd-3-clause | 7,581 | 0 | 17 | 1,741 | 1,776 | 895 | 881 | -1 | -1 |
{-# LANGUAGE LambdaCase #-}
module Main (main) where
import Control.Applicative
import Control.Exception (IOException)
import Control.Monad
import Data.Foldable (for_, traverse_)
import Data.List (isSuffixOf)
import Data.Maybe (catMaybes, fromMaybe)
import ... | supki/pakej | bin/Main.hs | bsd-3-clause | 4,479 | 0 | 19 | 975 | 1,227 | 646 | 581 | 93 | 4 |
{-# LANGUAGE UndecidableInstances #-}
-- | 'Syntactic' instance for functions
--
-- This module is based on having 'BindingT' in the domain. For 'Binding' import module
-- "Data.Syntactic.Sugar.Binding" instead
module Data.Syntactic.Sugar.BindingT where
import Data.Typeable
import Data.Syntactic
import Data.Synta... | emwap/syntactic | src/Data/Syntactic/Sugar/BindingT.hs | bsd-3-clause | 704 | 0 | 9 | 166 | 176 | 95 | 81 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
module Handlers.Auth.Login(
indexR
)where
import qualified Data.Text as T
import qualified Data.Text.Lazy as LT
import qualified Data.ByteString.Char8 as C8
import Data.Either
import Data.Maybe
import Control.Monad.Trans.Class (MonadTrans, lift)
i... | DavidAlphaFox/sblog | src/Handlers/Auth/Login.hs | bsd-3-clause | 2,183 | 0 | 14 | 423 | 604 | 328 | 276 | 55 | 3 |
{-# LANGUAGE TemplateHaskell #-}
module Kiosk.Backend.DataSpec (main, spec, testGenerateDataTemplate, encodeDecodeHashTests) where
import Control.Applicative ((<$>))
import Control.Arrow ((***))
import Data.Aeson (Value (..), decode,
... | plow-technologies/cobalt-kiosk-data-template | test/Kiosk/Backend/DataSpec.hs | bsd-3-clause | 4,941 | 0 | 18 | 1,403 | 1,123 | 594 | 529 | 93 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.