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 : ForSyDe.Atom.Skel.Vector.Matrix
-- Copyright : (c) George Ungureanu, KTH/EECS/ESY 2019-2020
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : ugeorge@kth.se
-- Stability : experimental
-- Po... | forsyde/forsyde-atom | src/ForSyDe/Atom/Skel/Vector/Matrix.hs | bsd-3-clause | 12,222 | 0 | 15 | 3,073 | 2,327 | 1,263 | 1,064 | 141 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE RecordWildCards #-}
import Data.String (fromString)
import System.Environment (getArgs)
import System.IO (withFile,IOMode(ReadMode,WriteMode))
import System.Posix.Signals (installHandler,sigINT,sigTERM,... | mitsuji/bingo | app/Main.hs | bsd-3-clause | 13,391 | 0 | 16 | 3,168 | 3,477 | 1,779 | 1,698 | 259 | 8 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
#ifdef GLADE_DIR
#else
#define GLADE_DIR "./"
#endif
{-|
Module : Numeric.AERN.IVP.Plot.PicardView
Descriptio... | michalkonecny/aern | aern-ivp/src/Numeric/AERN/IVP/Plot/PicardView.hs | bsd-3-clause | 20,283 | 0 | 14 | 7,365 | 892 | 660 | 232 | 59 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
-- | The Sunroof server module provides infrastructure to use
-- Sunroof together with kansas-comet.
--
-- It supports setting up a simple server with 'sunroofServer'
-- and provides basic functions for servers... | ku-fpg/sunroof-server | Language/Sunroof/Server.hs | bsd-3-clause | 22,364 | 0 | 18 | 4,814 | 4,474 | 2,374 | 2,100 | 319 | 2 |
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-}
module Language.GDL.Parser
( parse, parseMaybe
, parseQuery, parseTerm, parseSexp
, sexpToTerm, sexpsToDatabase
) where
import Control.Applicative ((<$>), (<*), (*>))
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteS... | ian-ross/ggp | Language/GDL/Parser.hs | bsd-3-clause | 3,878 | 0 | 15 | 902 | 1,248 | 662 | 586 | 72 | 7 |
{-# language CPP #-}
-- | = Name
--
-- VK_EXT_validation_features - instance extension
--
-- == VK_EXT_validation_features
--
-- [__Name String__]
-- @VK_EXT_validation_features@
--
-- [__Extension Type__]
-- Instance extension
--
-- [__Registered Extension Number__]
-- 248
--
-- [__Revision__]
-- 5
--
... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_EXT_validation_features.hs | bsd-3-clause | 22,089 | 2 | 18 | 4,674 | 2,297 | 1,403 | 894 | -1 | -1 |
module Main (main) where
import Distribution.Simple ( defaultMainWithHooks, simpleUserHooks
, UserHooks(runTests))
import System.Cmd (system)
main :: IO ()
main = defaultMainWithHooks hooks
where hooks = simpleUserHooks { runTests = runTests' }
-- Runs the testsuite
runTests' ... | cornell-pl/HsAdapton | syb-with-class-and-effects/Setup.hs | bsd-3-clause | 477 | 0 | 9 | 131 | 128 | 72 | 56 | 11 | 1 |
import Types
import Graphics.GL.Pal
someCubes2 :: Float -> [Cube]
someCubes2 = \t ->
[ newCube
{ cubeColor = colorHSL (x*0.01+t*0.3) 0.8 0.4
, cubeRotation = axisAngle (V3 0 1 0) (t*1)
, cubePosition = V3 (sin (t+x*0.11) * 0.1)
(x*0.1-1.5)
... | lukexi/cubensis | defs/Cubes2.hs | bsd-3-clause | 412 | 0 | 15 | 171 | 171 | 94 | 77 | 12 | 1 |
{-# LANGUAGE RecordWildCards #-}
-- |
-- Module : Database.LevelDB.IO
-- Copyright : (c) Austin Seipp 2012
-- License : BSD3
--
-- Maintainer : mad.one@gmail.com
-- Stability : experimental
-- Portability : portable
--
-- This module provides a mid level interface to Google's
-- LevelDB (<http://leveldb... | thoughtpolice/hs-leveldb | src/Database/LevelDB/IO.hs | bsd-3-clause | 20,918 | 0 | 22 | 5,620 | 3,792 | 2,008 | 1,784 | 359 | 3 |
module Lift
( lambdaLiftProgram
) where
import Data.List (sort, nub)
import Control.Monad.State
import Control.Monad.Writer
import Syntax
import Type
without
:: Eq a
=> [a] -> [a] -> [a]
without = foldr (filter . (/=))
free :: Expression Typed -> [Typed]
free (Quote _) = []
free (Quasiquote x) = free' x
fr... | jjingram/satori | src/Lift.hs | bsd-3-clause | 4,695 | 0 | 13 | 1,126 | 2,195 | 1,092 | 1,103 | 128 | 9 |
module RPS.Game (
Hand(..),
Result(..),
whoWins,
whatToDo
) where
data Hand = Rock | Paper | Scissors
deriving (Show, Eq)
data Result = Win | Lose | Tie
instance Show Result where
show Win = "You won! :)"
show Lose = "You lost! :("
show Tie = "Tie -.-"
whoWins :: Hand -> Hand -> Result
whoWins play... | cjw-charleswu/Wizard | RockPaperScissors/src/RPS/Game.hs | bsd-3-clause | 536 | 0 | 11 | 147 | 213 | 121 | 92 | 22 | 5 |
-- (c) The University of Glasgow 2006
-- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
--
-- Storage manager representation of closures
{-# LANGUAGE CPP,GeneralizedNewtypeDeriving #-}
module GHC.Runtime.Layout (
-- * Words and bytes
WordOff, ByteOff,
wordsToBytes, bytesToWordsRound... | sdiehl/ghc | compiler/GHC/Runtime/Layout.hs | bsd-3-clause | 20,181 | 0 | 14 | 4,791 | 3,705 | 1,944 | 1,761 | 316 | 26 |
------------------------------------------------------------------------------
-- |
-- Module : Data.Datamining.Clustering.Gsom.Input
-- Copyright : (c) 2009 Stephan Günther
-- License : BSD3
--
-- Maintainer : gnn.github@gmail.com
-- Stability : experimental
-- Portability : portable
--
-- The GSOM... | gnn/hsgsom | Data/Datamining/Clustering/Gsom/input.hs | bsd-3-clause | 4,787 | 0 | 13 | 854 | 1,057 | 609 | 448 | 53 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
import Control.Applicative
import Control.Arrow (first)
import Control.Monad (mzero)
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Char8 as BLC
import qualified Data.Byt... | kowey/zennit | userstats.hs | bsd-3-clause | 4,155 | 0 | 14 | 1,318 | 1,238 | 661 | 577 | 101 | 3 |
module Staller where
import Control.Arrow.Flow
import Control.Monad
produce1 :: Monad m => Flow m a Int
produce1 = stall $ Flow $ \_ -> return (finished 1, produce1)
incr :: Monad m => Flow m Int Int
incr = stall $ Flow $ \i -> return (finished (i + 1),incr)
simulate :: (Show s) => Flow IO () s -> IO ()
simul... | igraves/flow-arrow | examples/Staller.hs | bsd-3-clause | 596 | 0 | 11 | 211 | 227 | 115 | 112 | 15 | 1 |
{-# LANGUAGE NegativeLiterals #-}
{-# LANGUAGE ScopedTypeVariables #-}
module TextRow where
import Control.Applicative
import Data.Time.Calendar (fromGregorian)
import Data.Time.LocalTime (LocalTime (..), TimeOfDay (..))
import Database.MySQL.Base
import qualified System.IO... | winterland1989/mysql-haskell | test/TextRow.hs | bsd-3-clause | 13,111 | 0 | 13 | 5,759 | 2,256 | 1,151 | 1,105 | 274 | 1 |
module Codegen.Utils where
import Data.Word
import LLVM.General.AST
import qualified LLVM.General.AST.Constant as C
import qualified LLVM.General.AST.CallingConvention as CC
import LLVM.General.AST.Type
import LLVM.General.AST.IntegerPredicate
type Instructions = [Named Instruction]
defBits :: Word32
defBits = 64
i... | abbradar/dnohs | src/Codegen/Utils.hs | bsd-3-clause | 5,548 | 0 | 10 | 1,933 | 1,494 | 849 | 645 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Layout
( prop_layout )
where
import Prelude hiding (map)
import Data.List (intersperse)
import Data.MonadicStream hiding (concatMap)
import Control.Applicative
import Test.QuickCheck
import Text.Position
import Text.Lexeme
import qualified Data.Set as S
import Languag... | bobatkey/Forvie | tests/Layout.hs | bsd-3-clause | 5,694 | 0 | 14 | 1,242 | 1,034 | 561 | 473 | 91 | 3 |
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies #-}
module Examples.KeyMove where
import Graphics.UI.Toy.Prelude
data State = State {
pos, vel :: R2
}
type instance V State = R2
instance Interactive Gtk State where
tick input state = return (State pos' vel', True)
where
pos' = pos state + vel'
... | mgsloan/toy-gtk-diagrams | Examples/KeyMove.hs | bsd-3-clause | 776 | 0 | 13 | 203 | 297 | 158 | 139 | 20 | 1 |
-- |
-- Module : Game.Terrain.Rendering
-- Description : Responsible for generating meshes from terrain
-- Copyright : (c) 2016 Caitlin Wilks
-- License : BSD3
-- Maintainer : Caitlin Wilks <mitasuki@gmail.com>
--
--
module Game.Terrain.Rendering
where
import Game.Terrain.Data
import LambdaCube.GL... | Catchouli/tyke | src/Game/Terrain/Rendering.hs | bsd-3-clause | 5,678 | 0 | 17 | 2,094 | 1,738 | 973 | 765 | 92 | 6 |
module Network.Waisp.Handler.Slingshot.Network where
-- | XXX: Ripped off from 'streaming-commons', give proper credit.
-- TODO: This should be in another package and, possible, everything but
-- bindPortTCP should be exported through an internal module.
import Data.Monoid ((<>))
import Data.Foldable (traverse_)
imp... | jdnavarro/slingshot | src/Network/Waisp/Handler/Slingshot/Network.hs | bsd-3-clause | 4,111 | 0 | 18 | 1,356 | 844 | 469 | 375 | 89 | 9 |
module Pos.Core.Slotting.LocalSlotIndex
( LocalSlotIndex (..)
, mkLocalSlotIndex
, addLocalSlotIndex
, localSlotIndexToEnum
, localSlotIndexFromEnum
, localSlotIndexSucc
, localSlotIndexPred
, localSlotIndexMinBound
, localSlotIndexMaxBound
, loca... | input-output-hk/pos-haskell-prototype | core/src/Pos/Core/Slotting/LocalSlotIndex.hs | mit | 4,181 | 0 | 11 | 815 | 879 | 463 | 416 | -1 | -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-redshift/gen/Network/AWS/Redshift/DescribeOrderableClusterOptions.hs | mpl-2.0 | 8,805 | 0 | 15 | 1,733 | 1,016 | 608 | 408 | 116 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Program.Db
-- Copyright : Isaac Jones 2006, Duncan Coutts 2007-2009
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This provides a 'ProgramDb' type which holds confi... | IreneKnapp/Faction | libfaction/Distribution/Simple/Program/Db.hs | bsd-3-clause | 15,042 | 0 | 18 | 3,645 | 2,545 | 1,392 | 1,153 | 221 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module Graphics.Storyboard.Bling where
-- import Data.Text(Text)
--
-- import Graphics.Blank
-- import qualified Graphics.Blank.Style as Style
--
-- import Graphics.Storyboard.Slide
-- import Graphics.Storyboard.Tile
| tonymorris/story-board | src/Graphics/Storyboard/Bling.hs | bsd-3-clause | 255 | 0 | 3 | 30 | 15 | 13 | 2 | 2 | 0 |
{-
(c) Galois, 2006
(c) University of Glasgow, 2007
-}
{-# LANGUAGE NondecreasingIndentation #-}
module Coverage (addTicksToBinds, hpcInitCode) where
import Type
import HsSyn
import Module
import Outputable
import DynFlags
import Control.Monad
import SrcLoc
import ErrUtils
import NameSet hiding (FreeVars)
import Nam... | bitemyapp/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | 48,601 | 0 | 25 | 14,664 | 12,943 | 6,562 | 6,381 | 929 | 8 |
-- | Extra functions for optparse-applicative.
module Options.Applicative.Builder.Extra
(boolFlags
,boolFlagsNoDefault
,maybeBoolFlags
,firstBoolFlags
,enableDisableFlags
,enableDisableFlagsNoDefault
,extraHelpOption
,execExtraHelp
,textOption
,textArgument
,optionalFirst
) where
import Contro... | Heather/stack | src/Options/Applicative/Builder/Extra.hs | bsd-3-clause | 5,724 | 0 | 20 | 1,950 | 1,039 | 553 | 486 | 107 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
{-
NOTE: Don't modify this file unless you know what you are doing. If you are
new to snap, start with Site.hs and Application.hs. This file contains
boilerplate needed for dynamic reloading and is not meant for general
consumption.
Occasionally if ... | alexandrelucchesi/pfec | rest-client/src/Main.hs | apache-2.0 | 5,008 | 0 | 11 | 1,011 | 335 | 211 | 124 | 27 | 1 |
yes = if foo then stuff else return () | mpickering/hlint-refactor | tests/examples/Default27.hs | bsd-3-clause | 38 | 0 | 7 | 8 | 19 | 10 | 9 | 1 | 2 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# OPTIONS_HADDOCK show-extensions #-}
{- |
Copyright : Copyright (C) 2006-2018 Bjorn Buckwalter
License : BSD3
Maintainer : bjorn@buckwalter.se
Stability : Stable
Portability: GHC only
Provides a 'Functor' instance for 'Dimensional'.
Note that this instanc... | bjornbm/dimensional | src/Numeric/Units/Dimensional/Functor.hs | bsd-3-clause | 1,118 | 0 | 7 | 189 | 58 | 39 | 19 | 7 | 0 |
{-# LANGUAGE RankNTypes, NamedFieldPuns, RecordWildCards #-}
module Distribution.Server.Features.Distro (
DistroFeature(..),
DistroResource(..),
initDistroFeature
) where
import Distribution.Server.Framework
import Distribution.Server.Features.Core
import Distribution.Server.Features.Users
import Distr... | ocharles/hackage-server | Distribution/Server/Features/Distro.hs | bsd-3-clause | 11,883 | 0 | 23 | 2,969 | 2,718 | 1,411 | 1,307 | 200 | 11 |
{-# LANGUAGE BangPatterns, Rank2Types, UnboxedTuples #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- |
-- Module : Data.Text.Private
-- Copyright : (c) 2011 Bryan O'Sullivan
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : GHC
module Data.Text.Private... | mightymoose/liquidhaskell | benchmarks/text-0.11.2.3/Data/Text/Private.hs | bsd-3-clause | 1,617 | 0 | 13 | 522 | 390 | 217 | 173 | 24 | 2 |
module Poly0 () where
import Language.Haskell.Liquid.Prelude
myabs x = if x `gt` 0 then x else 0 `minus` x
----------------------------------------------------------
myid3 x y = y
x = choose 0
prop_id6 = liquidAssertB (x' `geq` 0)
where x' = myid3 [] $ myabs x
| mightymoose/liquidhaskell | tests/pos/poly2.hs | bsd-3-clause | 275 | 0 | 9 | 57 | 97 | 56 | 41 | 7 | 2 |
module UnitTests.Distribution.Client.Targets (
tests
) where
import Distribution.Client.Targets (UserConstraint (..), readUserConstraint)
import Distribution.Compat.ReadP (ReadP, readP_to_S)
import Distribution.Package (PackageName (..))
import Distribution.ParseUtils (parseCommaList)
... | randen/cabal | cabal-install/tests/UnitTests/Distribution/Client/Targets.hs | bsd-3-clause | 2,010 | 0 | 12 | 434 | 454 | 252 | 202 | 41 | 1 |
{-# LANGUAGE QuasiQuotes #-}
module C.Compiler (compileTree) where
import qualified C.Expr as C
import C.Expr (Op)
import Data.Hashable (hash)
import Data.Maybe
import Asm.QQ
import Asm.Expr (Register(..), Instruction(..), Condition(..), litNum, litLbl, reg)
import qualified Asm.Parser as A
import qualified Asm.Expr... | unknownloner/calccomp | C/Compiler.hs | mit | 5,914 | 0 | 14 | 1,806 | 2,530 | 1,334 | 1,196 | 138 | 6 |
{-# LANGUAGE ExplicitForAll #-}
-- We export this stuff separately so we don't clutter up the
-- API of the Graphics.Gloss module.
-- | This game mode lets you manage your own input. Pressing ESC will still abort the program,
-- but you don't get automatic pan and zoom controls like with `displayInWindow`.
module ... | gscalzo/HaskellTheHardWay | gloss-try/gloss-master/gloss/Graphics/Gloss/Interface/Pure/Game.hs | mit | 1,898 | 2 | 15 | 536 | 289 | 181 | 108 | 30 | 1 |
module Alpha
( runMain
, other
) where
import Beta
import Gamma
import Delta.Epsilon
import Delta.Zeta
runMain = do
putStrLn (show other)
other = [1, 2, 3, 4, 5]
|> head . groupBy (\a b -> a `mod` 2 == b `mod` 2)
|> sum
| Chatanga/codingame-hs | data/Alpha.hs | mit | 245 | 0 | 12 | 70 | 106 | 62 | 44 | -1 | -1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
------------------------------------------------------------------------------
module Graphics.DetailGen.Monad
(
-- * Shape
Shape (..)
-- * Detail
, Detail (..)
-- * DetailGen
, DetailGen
, runDetailGen
, detail
, branch
, pure... | zmthy/incidental-detail | src/Graphics/DetailGen/Monad.hs | mit | 2,642 | 0 | 11 | 443 | 591 | 327 | 264 | 50 | 3 |
module Exercise where
subset :: Ord a => [a] -> [a] -> Bool
subset sub set = and $ map (\x -> x `elem` set) sub
| tcoenraad/functioneel-programmeren | 2014/opg2b.hs | mit | 113 | 0 | 9 | 27 | 63 | 35 | 28 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Test.Tasty.KAT.FileLoader
-- License : MIT
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : Good
--
-- extra loaders helpers
--
module Test.Tasty.KAT.FileLoader
( katLoader
, katLoaderSimple
-- * ... | vincenthz/tasty-kat | Test/Tasty/KAT/FileLoader.hs | mit | 8,040 | 0 | 16 | 2,517 | 2,102 | 1,125 | 977 | 132 | 5 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE RankNTypes #-}
module TowerIntersect where
import Data.Hashable (Hashable)
import Data.Holmes
import Data.JoinSemilattice.Intersect (toList)
import Data.List (transpose)
import Data.Maybe (mapMaybe)
import ... | robx/puzzles | towerdefence/src/TowerIntersect.hs | mit | 2,605 | 0 | 18 | 615 | 1,005 | 528 | 477 | 63 | 5 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
module DynamoDbEventStore.InMemoryDynamoTable
(InMemoryDynamoTable
, emptyDynamoTable
, readDb
, writeDb
, updateDb
, queryDb
, scanNeedsPagingDb
) where
import BasicPrelude
import Control.Lens
import qualified Data.... | adbrowne/dynamodb-eventstore | dynamodb-eventstore/tests/DynamoDbEventStore/InMemoryDynamoTable.hs | mit | 4,778 | 0 | 16 | 1,081 | 1,121 | 588 | 533 | -1 | -1 |
{-
HAAP: Haskell Automated Assessment Platform
This module provides the @CodeWorld@ plugin to compile _CodeWorld_ animations (<https://github.com/google/codeworld>) to HTML webpages.
-}
{-# LANGUAGE UndecidableInstances, TypeOperators, FlexibleContexts, FlexibleInstances, TypeFamilies, MultiParamTypeClasses, EmptyDa... | hpacheco/HAAP | src/HAAP/Web/Graphics/CodeWorld.hs | mit | 9,049 | 0 | 36 | 2,996 | 1,926 | 990 | 936 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
module IHaskell.Display.Widgets.Box.SelectionContainer.Tab (
-- * The Tab widget
TabWidget,
-- * Constructor
mkTabWidget) where
-- To keep `cabal repl` happy wh... | beni55/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Box/SelectionContainer/Tab.hs | mit | 1,876 | 0 | 13 | 446 | 383 | 211 | 172 | 42 | 1 |
{-# LANGUAGE Arrows #-}
module Core.Log(
-- | Logging in game monad
logInfo
, logWarn
, logError
-- | Logging within game wire
, logInfoA
, logWarnA
, logErrorA
-- | Logging discrete events
, logInfoE
, logWarnE
, logErrorE
-- | Tracing events (debug)
, traceEvent
, traceEventShow
) wh... | NCrashed/sinister | src/shared/Core/Log.hs | mit | 1,824 | 2 | 12 | 365 | 495 | 277 | 218 | 46 | 2 |
module PackageList
( update
, show' ) where
--
--
--
show' :: IO ()
show' = putStrLn "Displaying a list of available packages"
--
--
--
update :: IO ()
update = putStrLn "Updating package list from all available repositories"
| grsmv/sllar-client | src/PackageList.hs | mit | 234 | 0 | 6 | 49 | 54 | 32 | 22 | 7 | 1 |
{-|
Provides functionality to setup the Lua environment and run Lua themes.
To understand how a Lua theme is run you need to know:
* How resources are passed into the runner
* How information is passed between Lua and Haskell
* What a theme should consist of
This module provides a single function 'runThemeScript' th... | rzetterberg/alven | src/lib/Foreign/Lua.hs | mit | 4,507 | 0 | 16 | 1,064 | 656 | 314 | 342 | -1 | -1 |
-- Dragon's Curve
-- http://www.codewars.com/kata/53ad7224454985e4e8000eaa/
module DragonCurve where
dragon :: Int -> String
dragon n | n < 0 = ""
| otherwise = filter (not . flip elem "ab") . f "Fa" $ n
where f [] _ = []
f xs 0 = xs
f xs n = f (concatMap g xs) (n-1)
... | gafiatulin/codewars | src/6 kyu/DragonCurve.hs | mit | 435 | 0 | 11 | 176 | 167 | 82 | 85 | 10 | 3 |
main :: IO ()
main = do
print $ get $ test 9
test :: Integer -> Maybe Integer
test i = do
x <- may i
may $ x + 1
may :: Integer -> Maybe Integer
may i = Just i
get :: Maybe Integer -> Integer
get Nothing = 0
get (Just i) = i
| dcjohnson/learning-haskell | arrow_notation.hs | mit | 234 | 0 | 8 | 67 | 128 | 61 | 67 | 12 | 1 |
module Data.TransientStoreSpec where
import Test.Hspec
import Data.TransientStore
import Control.Concurrent
import Data.UUID
spec :: Spec
spec = do
describe "peek" $ do
it "returns Nothing if db is empty" $ do
db <- create 5 :: IO (TransientStore String)
peek db nil `s... | steven777400/TwilioIVR | test/Data/TransientStoreSpec.hs | mit | 3,839 | 0 | 19 | 1,541 | 1,103 | 503 | 600 | 93 | 1 |
module Main where
import qualified GLM.Dot as D
main :: IO ()
main = D.main
| sordina/GLM | src/DotMain.hs | mit | 78 | 0 | 6 | 17 | 29 | 18 | 11 | 4 | 1 |
{-# LANGUAGE DeriveGeneric, GeneralizedNewtypeDeriving #-}
module Backhand.Unique where
import GHC.Generics
import Data.Aeson
import Data.Hashable
import Data.UUID
import Data.Vector
import Control.Concurrent.Unique
import System.Random
newtype ChanUUID =
ChanUUID UUID
deriving (Eq, Hashable, Generic)
inst... | quietspace/Backhand | backhand/src/Backhand/Unique.hs | mit | 1,064 | 0 | 18 | 235 | 255 | 134 | 121 | 32 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-sqlinjectionmatchset.html
module Stratosphere.Resources.WAFSqlInjectionMatchSet where
import Stratosphere.... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/WAFSqlInjectionMatchSet.hs | mit | 2,328 | 0 | 15 | 248 | 279 | 162 | 117 | 31 | 1 |
import Mario
main = marioMain
| mdietz94/MAAX | app/src/Main.hs | gpl-2.0 | 31 | 0 | 4 | 6 | 9 | 5 | 4 | 2 | 1 |
-- -*- mode: haskell -*-
{-# LANGUAGE TemplateHaskell #-}
module Baum.Order where
import Autolib.ToDoc
import Autolib.Reader
import Data.Typeable
data Order = Pre | In | Post | Level
deriving ( Eq, Ord, Typeable )
$(derives [makeReader, makeToDoc] [''Order])
instance Show Order where show = render . toDoc | marcellussiegburg/autotool | collection/src/Baum/Order.hs | gpl-2.0 | 317 | 0 | 9 | 57 | 94 | 54 | 40 | 9 | 0 |
module Grin.Main(compileToGrin) where
import Control.Monad
import Data.List
import Data.Monoid(mappend)
import System.Directory
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import qualified Data.ByteString.Lazy.UTF8 as LBS
import qualified Data.Map as Map
import qualified Data.Se... | dec9ue/jhc_copygc | src/Grin/Main.hs | gpl-2.0 | 6,549 | 0 | 18 | 1,580 | 1,908 | 985 | 923 | -1 | -1 |
main :: IO()
main = do
print(count_digits 0)
{-
Зад. 1. Да се дефинира процедура count_digits :: Int -> Int, която генерира линейно
рекурсивен процес и намира броя на цифрите на дадено естествено число n.
-}
count_digits :: Int -> Int
count_digits 0 = -1
count_digits n = if n < 10 then 1 else 1 + count_digits(n ... | minchopaskal/Functional-Programming | Haskell/Practicum/ex1.hs | gpl-3.0 | 2,669 | 0 | 12 | 553 | 488 | 258 | 230 | 28 | 2 |
{-# LANGUAGE Arrows #-}
module FRP.Counters (
CounterCommand(..),
applyCounterCommand,
CounterControl,
counterControl
) where
import Common.Counters
import Data.Monoid
import FRP.Yampa
data CounterCommand =
CounterAdd Int | CounterSub Int | CounterSet Int | CounterReset Int deriving Show
instance Monoid Counte... | CLowcay/CC_Clones | src/FRP/Counters.hs | gpl-3.0 | 1,954 | 14 | 16 | 341 | 858 | 450 | 408 | 43 | 5 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-type-defaults #-}
module Main where
import Control.Applicative
import Data.Monoid
import Text.Radexp.Simple
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2
import Test.HUnit... | scvalex/radexp | Test/Props.hs | gpl-3.0 | 2,276 | 0 | 13 | 546 | 595 | 292 | 303 | 63 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Enqueue (Command(..), Options(..), RetryCommand(..), run) where
--------------------------------------------------------------------------------
import Control.Monad ((>=>), forM_, when, void)
import Control.Monad.Trans (lift)
import Data.List (nub... | metabrainz/musicbrainz-email | enqueue/Enqueue.hs | gpl-3.0 | 4,064 | 0 | 15 | 741 | 896 | 490 | 406 | 70 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-cloudmonitoring/gen/Network/Google/Resource/CloudMonitoring/MetricDescriptors/List.hs | mpl-2.0 | 5,674 | 0 | 17 | 1,281 | 655 | 390 | 265 | 95 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE BangPatterns #-}
module Main where
import Control.Applicative ((<$>), (<*>), Applicative)
import Control.Monad (foldM, replicateM)
import Control.Monad.Random
--import Control.Monad.Random.Class (MonadRandom)
import Control.Monad.Reader
import Control.Monad.Reader.Cla... | cdepillabout/haskell-random-dice-test | src/Main.hs | mpl-2.0 | 4,692 | 0 | 18 | 1,257 | 1,635 | 856 | 779 | 114 | 22 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-youtube-reporting/gen/Network/Google/Resource/YouTubeReporting/Jobs/Reports/Get.hs | mpl-2.0 | 5,494 | 0 | 19 | 1,302 | 862 | 501 | 361 | 124 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.ResourceManager
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozi... | brendanhay/gogol | gogol-resourcemanager/gen/Network/Google/ResourceManager.hs | mpl-2.0 | 21,377 | 0 | 54 | 3,689 | 2,174 | 1,587 | 587 | 428 | 0 |
-- | This module defines both conditions and scopes. Since there is a mutual
-- dependency, they need to go in the same module
module Condition
(Scope(..),Condition(..),Value(..),Predicate(..),ScopeType(..)
,scope
,condition
,value
,scopedValue
,scopeType
) where
import... | joelwilliamson/validator | Condition.hs | agpl-3.0 | 14,373 | 0 | 22 | 2,819 | 2,577 | 1,595 | 982 | -1 | -1 |
module Git.Command.Help (run) where
run :: [String] -> IO ()
run args = return () | wereHamster/yag | Git/Command/Help.hs | unlicense | 82 | 0 | 7 | 15 | 42 | 23 | 19 | 3 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-|
Module : Models.Events
Description : A module for communication events.
Copyright : (c) 2017 Pascal Poizat
License : Apache-2.0 (see the file LICENSE)
Maintainer : pascal.poizat@lip6.fr
Stability : experimental
Portability : unknown
-}
module Models.Events (
-- * con... | pascalpoizat/vecahaskell | src/Models/Events.hs | apache-2.0 | 7,240 | 0 | 8 | 1,538 | 1,654 | 867 | 787 | 122 | 1 |
module Braxton.A282169Spec (main, spec) where
import Test.Hspec
import Braxton.A282169 (a282169)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A282169" $
it "correctly computes the first 5 elements" $
take 5 (map a282169 [1..]) `shouldBe` expectedValue where
expectedValue = [1,2,2,6,6]
| peterokagey/haskellOEIS | test/Braxton/A282169Spec.hs | apache-2.0 | 317 | 0 | 10 | 59 | 115 | 65 | 50 | 10 | 1 |
{-# LANGUAGE BangPatterns #-}
module Kernel.CPU.GCF (kernel) where
import Foreign.C
import Foreign.Ptr
import Foreign.Storable
import Foreign.Marshal.Array
import Data.Complex
import Kernel.CPU.FFT
import Data
import Vector
foreign import ccall mkGCFLayer ::
FftPlan
-> Ptr (Complex Double) -- destination buf... | SKA-ScienceDataProcessor/RC | MS4/dna-programs/Kernel/CPU/GCF.hs | apache-2.0 | 3,094 | 1 | 23 | 863 | 914 | 465 | 449 | 73 | 4 |
{-# LANGUAGE TemplateHaskell #-}
{-| Lenses for Ganeti config objects
-}
{-
Copyright (C) 2014 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must reta... | leshchevds/ganeti | src/Ganeti/Objects/Lens.hs | bsd-2-clause | 4,515 | 0 | 10 | 691 | 779 | 404 | 375 | 88 | 1 |
module Model.Par.Observer
( Observer(..)
, filtered
) where
import Data.Functor.Contravariant
import Data.Functor.Contravariant.Divisible
import Data.Void
import Model.Par
newtype Observer a = Observer { (!) :: a -> Par () }
instance Contravariant Observer where
contramap f (Observer g) = Observer (g . f)
... | ekmett/models | src/Model/Par/Observer.hs | bsd-2-clause | 797 | 21 | 10 | 184 | 281 | 162 | 119 | 21 | 2 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE Sco... | gcross/LogicGrowsOnTrees | LogicGrowsOnTrees/sources/LogicGrowsOnTrees/Parallel/Common/Worker.hs | bsd-2-clause | 25,356 | 10 | 26 | 6,472 | 3,110 | 1,665 | 1,445 | -1 | -1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QMessageBox_h.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:21
Warning : this file is machine generated - do... | keera-studios/hsQt | Qtc/Gui/QMessageBox_h.hs | bsd-2-clause | 60,217 | 0 | 18 | 12,816 | 19,731 | 9,515 | 10,216 | -1 | -1 |
{-|
Copyright : (c) Dave Laing, 2017
License : BSD3
Maintainer : dave.laing.80@gmail.com
Stability : experimental
Portability : non-portable
-}
module Fragment.Bool.Ast (
module X
) where
import Fragment.Bool.Ast.Type as X
import Fragment.Bool.Ast.Pattern as X
import Fragment.Bool.Ast.Term as X
| dalaing/type-systems | src/Fragment/Bool/Ast.hs | bsd-3-clause | 312 | 0 | 4 | 55 | 41 | 31 | 10 | 5 | 0 |
import qualified Sharc.Types as Sh
import Csound.Base
import Sharc.Data
import Sharc.Types
note2sig :: Sh.Note -> Sig
note2sig n = oscBy (harmonics2tab $ Sh.noteHarmonics n) (sig $ double $ Sh.pitchFund $ Sh.notePitch n)
note2tab :: Sh.Note -> Tab
note2tab n = (harmonics2tab $ Sh.noteHarmonics n)
deg x = 180 * x / ... | FranklinChen/csound-expression | ideas/Sharc.hs | bsd-3-clause | 467 | 0 | 12 | 78 | 186 | 97 | 89 | 10 | 1 |
module MABS
( mabs
) where
import qualified ANTs (applyTransforms, computeWarp)
import Control.Monad (unless)
import Data.List (intercalate)
import Data.List.Split (splitOn)
import qualified Development.Shake as Shake (need... | pnlbwh/test-tensormasking | pipeline-lib/MABS.hs | bsd-3-clause | 1,773 | 0 | 16 | 571 | 447 | 244 | 203 | 34 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Models.Media (
Media(..)
, PostMedia(..)
, postMediaQueryByPostId
, cr... | pellagic-puffbomb/simpleservantblog | src/Models/Media.hs | bsd-3-clause | 3,342 | 0 | 10 | 1,126 | 579 | 340 | 239 | 84 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
import ClassyPrelude
main :: IO ()
main = putStrLn "Test suite not yet implemented"
| JoeMShanahan/blizzard-haskell-api | test/Spec.hs | bsd-3-clause | 156 | 0 | 6 | 24 | 24 | 13 | 11 | 5 | 1 |
module HasOffers.API.Affiliate.OfferFile
where
import Data.Text
import GHC.Generics
import Data.Aeson
import Control.Applicative
import Network.HTTP.Client
import qualified Data.ByteString.Char8 as BS
import HasOffers.API.Common
--------------------------------------------------------------------------------
| kelecorix/api-hasoffers | src/HasOffers/API/Affiliate/OfferFile.hs | bsd-3-clause | 320 | 0 | 4 | 31 | 50 | 34 | 16 | 8 | 0 |
{-# LANGUAGE DeriveGeneric #-}
{-
Andy Gill and Colin Runciman, June 2006
-}
-- | Datatypes and file-access routines for the tick data file
-- (@.tix@) used by Hpc.
module Trace.Haptics.Tix
( Tix (..)
, TixModule (..)
, tixModuleName
, tixModuleHash
, tixModuleTixs
, readTix
, writeTix
, getTixFil... | Javran/haptics | src/Trace/Haptics/Tix.hs | bsd-3-clause | 1,814 | 0 | 10 | 382 | 391 | 219 | 172 | 49 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Hasmin.Types.GradientSpec where
import Data.Text (Text)
import Hasmin.Parser.Value
import Hasmin.TestUtils
gradientTests :: Spec
gradientTests =
describe "<gradient> minification tests" $
mapM_ (matchSpecWithDesc (minifyWithTestConfig <$> value)) gradientTestsInf... | contivero/hasmin | tests/Hasmin/Types/GradientSpec.hs | bsd-3-clause | 3,643 | 0 | 10 | 621 | 343 | 219 | 124 | 72 | 1 |
-- | Testing task assignment annotations.
module Main where
import Control.Monad
import Data.Maybe
import NewARSim
import System.Random
import Test.QuickCheck
type IntPort p = DataElem Unqueued Int p
type P a = (a, a)
type C = P (IntPort Required)
-- | @comp1@ runs every time "task1" is activated, an... | josefs/autosar | ARSim/arsim/Test.hs | bsd-3-clause | 2,120 | 0 | 15 | 487 | 696 | 339 | 357 | 57 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module CCGServer.Tagging where
import Control.Applicative
import Control.Monad
import Data.Maybe
import Data.IORef
import Data.List
import qualified Data.Map as Map
import Data.Map (Map)
import qualified Graphics.UI.Threepenny as UI
import Graphics.UI.Thr... | archaephyrryx/CCG-Project | CCGServer/Tagging.hs | bsd-3-clause | 4,029 | 51 | 21 | 895 | 1,706 | 842 | 864 | 111 | 3 |
{-# language CPP #-}
-- No documentation found for Chapter "SharingMode"
module Vulkan.Core10.Enums.SharingMode (SharingMode( SHARING_MODE_EXCLUSIVE
, SHARING_MODE_CONCURRENT
, ..
... | expipiplus1/vulkan | src/Vulkan/Core10/Enums/SharingMode.hs | bsd-3-clause | 4,107 | 1 | 10 | 642 | 342 | 224 | 118 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Network.WebSockets.Socket.Tests
( tests
) where
import Control.Applicative ((<$>))
import Control.Concurrent (forkIO, killThread, threadDelay)
import Control.Exception (SomeException, catch)
import Control.Monad (forever, forM_, replicateM)
import Prelude hiding (cat... | 0xfaded/websockets | tests/haskell/Network/WebSockets/Socket/Tests.hs | bsd-3-clause | 3,287 | 0 | 13 | 636 | 897 | 482 | 415 | 69 | 1 |
{-{ http://en2.wikipedia.org/wiki/Zenix_(game) }-}
-----------
-- Zenix --
-----------
module Zenix (Zenix, zenix) where
import Game
import Data.Array
import Graphics.UI.WX hiding (border, point)
import Graphics.UI.WXCore hiding (point)
import Tools
data Zenix = Zenix (Array (Int, Int) (Maybe Player)) derivi... | HJvT/GeBoP | Zenix.hs | bsd-3-clause | 6,548 | 0 | 24 | 2,278 | 2,220 | 1,166 | 1,054 | 92 | 5 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
#if __GLASGOW_HASKELL__ >= 704
{-# LANGUAGE Safe #-}
#endif
#if __GLASGOW_HASKELL__ >= 708
{-# LANGUAGE RoleAnnotations #-}
#endif
#if __GLASGOW_HASKELL__ >= 710
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ViewPatterns #-}
#endif
------------------------------... | ezyang/nf | Data/NF/Internal.hs | bsd-3-clause | 2,859 | 2 | 9 | 523 | 212 | 148 | 64 | 11 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module Game.Monsters.MMutantGlobals where
import Control.Lens (makeLenses)
import Types
makeLenses ''MMutantGlobals
initialMMutantGlobals :: MMutantGlobals
initialMMutantGlobals =
MMutantGlobals { _mMutantSoundSwing = 0
, _mMutantSoundHit = 0
... | ksaveljev/hake-2 | src/Game/Monsters/MMutantGlobals.hs | bsd-3-clause | 795 | 0 | 6 | 317 | 119 | 76 | 43 | 20 | 1 |
module Code29_Loopless where
import Data.List hiding (insert)
import Code28
{-
bumpDn = unfoldr stepDn . prologDn
prologDn (k,n) = (k,k,n-1,1)
stepDn (j,k,m,n) = if m < n then Nothing
else Just (m+j,(k-j,k,m-1,n))
prologUp (k,n) = (if even n then k else 0,k,1,n-1)
ste... | sampou-org/pfad | Code/Code29_Loopless.hs | bsd-3-clause | 2,025 | 0 | 11 | 621 | 1,023 | 578 | 445 | 35 | 2 |
{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving,
FlexibleInstances, UndecidableInstances, GADTs #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE ViewPatte... | mcmaniac/hs-jquery | src/Language/JQuery/Internal/Types.hs | bsd-3-clause | 3,468 | 0 | 10 | 691 | 776 | 411 | 365 | -1 | -1 |
{-# LANGUAGE TupleSections, GADTs, StandaloneDeriving #-}
module V1SizeFlow
(
sizeFlow, Suspended, SizeFlowResult
)
where
import V1IState
import V1Flow
newtype Size = Size Int deriving (Read, Show)
newtype Height = Height Int deriving (Read, Show)
newtype Weight = Weight Int deriving (Read, Show)
newtype Col... | homam/fsm-conversational-ui | src/V1SizeFlow.hs | bsd-3-clause | 3,589 | 0 | 12 | 788 | 1,253 | 666 | 587 | 83 | 2 |
module Insomnia.ToF.Query where
import qualified Unbound.Generics.LocallyNameless as U
import Insomnia.Query
import Insomnia.ToF.Env
import Insomnia.ToF.Module (modulePath)
import qualified FOmega.Syntax as F
queryExpr :: ToF m => QueryExpr -> m F.Command
queryExpr qe_ =
case qe_ of
GenSamplesQE p params -> d... | lambdageek/insomnia | src/Insomnia/ToF/Query.hs | bsd-3-clause | 569 | 0 | 17 | 136 | 199 | 106 | 93 | 18 | 1 |
import Parser (parseString)
import CodeGenerator (compile)
import BfIR (toString)
import Control.Applicative((<$>))
import qualified Data.ByteString.Lazy.Char8 as BLC
import ShortBytes(getCachedShortByteParams)
main :: IO ()
main = do
shortByteParams <- getCachedShortByteParams
(toString . compile shortBytePara... | benma/bfc | src/Main.hs | bsd-3-clause | 521 | 0 | 12 | 74 | 107 | 63 | 44 | 10 | 1 |
module SpaceAge (Planet(..), ageOn) where
data Planet = Mercury
| Venus
| Earth
| Mars
| Jupiter
| Saturn
| Uranus
| Neptune
yearRelativeToEarth :: Planet -> Double
yearRelativeToEarth Earth = 1.0
yearRelativeToEarth Mercury = 0.240... | Bugfry/exercises | exercism/haskell/space-age/src/SpaceAge.hs | mit | 727 | 0 | 9 | 185 | 173 | 95 | 78 | 21 | 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-ecs/gen/Network/AWS/ECS/DeregisterTaskDefinition.hs | mpl-2.0 | 5,401 | 0 | 13 | 1,075 | 591 | 357 | 234 | 79 | 1 |
module Ignore where
| carymrobbins/intellij-haskforce | tests/gold/resolve/Module00003/Ignore.hs | apache-2.0 | 20 | 0 | 2 | 3 | 4 | 3 | 1 | 1 | 0 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANG... | haskell-servant/servant-swagger | src/Servant/Swagger/Internal/TypeLevel/TMap.hs | bsd-3-clause | 1,163 | 0 | 13 | 277 | 233 | 135 | 98 | 19 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Exception (SomeException, try)
import qualified Data.Text as T
import Snap.Http.Server
import Snap.Snaplet
import Snap.Core
import Snap.Snaplet.Config
import System.IO
... | Palmik/snaplet-mongodb-minimalistic | examples/example1/src/Main.hs | bsd-3-clause | 1,674 | 0 | 11 | 431 | 286 | 162 | 124 | 26 | 1 |
{-# LANGUAGE RebindableSyntax #-}
{-# OPTIONS_GHC -fplugin Control.Supermonad.Plugin #-}
{-
******************************************************************************
* H M T C *
* ... | jbracker/supermonad-plugin | examples/monad/hmtc/supermonad/ScopeLevel.hs | bsd-3-clause | 2,021 | 0 | 6 | 742 | 182 | 117 | 65 | 24 | 1 |
{-# LANGUAGE ExistentialQuantification, GADTs, ScopedTypeVariables, TypeFamilies, FlexibleInstances, MultiParamTypeClasses, GeneralizedNewtypeDeriving, RankNTypes, BangPatterns, UndecidableInstances, EmptyDataDecls, RecursiveDo, RoleAnnotations, FunctionalDependencies, FlexibleContexts #-}
module Reflex.Host.Class wher... | k0001/reflex | src/Reflex/Host/Class.hs | bsd-3-clause | 10,881 | 0 | 16 | 1,876 | 2,171 | 1,150 | 1,021 | 107 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.