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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE UnboxedTuples #-}
module Utils
( roundTo
, i2d
) where
import GHC.Base (Int(I#), Char(C#), chr#, ord#, (+#))
roundTo :: Int -> [Int] -> (Int, [Int])
roundTo d is =
case f d True is of
x@(0,_) -> x
(1,xs) -> (1, 1:xs)
_ ... | phadej/scientific | src/Utils.hs | bsd-3-clause | 868 | 0 | 12 | 276 | 411 | 229 | 182 | 26 | 6 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "System/EasyFile/Missing.hs" #-}
{-# LANGUAGE CPP #-}
module System.EasyFile.Missing where
----------------------------------------------------------------
import Control.Applicative
import Data.Time
import Data.Time.Cloc... | phischu/fragnix | tests/packages/scotty/System.EasyFile.Missing.hs | bsd-3-clause | 2,864 | 0 | 10 | 465 | 367 | 194 | 173 | 30 | 1 |
{-
Copyright 2017 The CodeWorld Authors. All Rights Reserved.
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 applicab... | venkat24/codeworld | funblocks-client/src/Blocks/Block.hs | apache-2.0 | 1,120 | 0 | 10 | 328 | 122 | 77 | 45 | 16 | 0 |
{- |
Module : $Id$
Copyright : (c) DFKI GmbH
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : portable
utilities for writing new rules.
-}
module RuleUtils where
import Text.PrettyPrint.HughesPJ
import DataP (Statement (..), D... | spechub/Hets | utils/DrIFT-src/RuleUtils.hs | gpl-2.0 | 4,222 | 4 | 13 | 1,013 | 1,425 | 754 | 671 | 77 | 2 |
class Eq a where
(==) :: a -> a -> Bool
x == y = not (x /= y)
(/=) :: a -> a -> Bool
x /= y = not (x == y)
infix 4 ==
infix 4 /=
(&&) :: Bool -> Bool -> Bool
(||) :: Bool -> Bool -> Bool
-- listEq :: [a] -> [a] -> Bool
-- listEq [] [] = True
-- listEq (x:xs) (y:ys) ... | themattchan/tandoori | input/eq.hs | bsd-3-clause | 577 | 0 | 9 | 222 | 230 | 122 | 108 | 16 | 1 |
module PackageTests.PathsModule.Executable.Check (suite) where
import PackageTests.PackageTester
(PackageSpec(..), assertBuildSucceeded, cabal_build)
import System.FilePath
import Test.Tasty.HUnit
suite :: FilePath -> Assertion
suite ghcPath = do
let spec = PackageSpec
{ directory = "PackageTests"... | Helkafen/cabal | Cabal/tests/PackageTests/PathsModule/Executable/Check.hs | bsd-3-clause | 504 | 0 | 13 | 116 | 118 | 67 | 51 | 13 | 1 |
module ListSpec where
import Control.Applicative
import Language.Haskell.GhcMod
import Test.Hspec
spec :: Spec
spec = do
describe "listModules" $ do
it "lists up module names" $ do
cradle <- findCradle
modules <- lines <$> listModules defaultOptions cradle
modules `shou... | carlohamalainen/ghc-mod | test/ListSpec.hs | bsd-3-clause | 344 | 0 | 15 | 89 | 85 | 44 | 41 | 11 | 1 |
{-# LANGUAGE Trustworthy #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Ix
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability : ... | frantisekfarka/ghc-dsi | libraries/base/Data/Ix.hs | bsd-3-clause | 2,048 | 0 | 5 | 571 | 76 | 69 | 7 | 12 | 0 |
{-# LANGUAGE FlexibleInstances #-}
--
-- 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. The ASF licenses this file
-- to you under the Apache License, Ver... | YinYanfei/CadalWorkspace | thrift/src/thrift-0.8.0/lib/hs/src/Thrift/Transport/Framed.hs | gpl-3.0 | 3,889 | 0 | 15 | 855 | 847 | 452 | 395 | 63 | 1 |
module Main where
main :: IO ()
main = do
putStrLn "This is my-executable"
| DavidAlphaFox/ghc | libraries/Cabal/cabal-install/tests/PackageTests/Exec/My.hs | bsd-3-clause | 80 | 0 | 7 | 19 | 25 | 13 | 12 | 4 | 1 |
module Rebase.GHC.Arr
(
module GHC.Arr
)
where
import GHC.Arr
| nikita-volkov/rebase | library/Rebase/GHC/Arr.hs | mit | 65 | 0 | 5 | 12 | 20 | 13 | 7 | 4 | 0 |
module RL.Generator.Dungeon (DungeonConfig(..), PlayerConfig(..), ItemConfig(..), levelGenerator, randomItemAppearances, module RL.Generator) where
import RL.Map
import RL.Generator
import RL.Generator.Cells (cells, cmid, cpoint, CellConfig(CellConfig))
import RL.Generator.Paths (paths, getTileAt)
import RL.Generator.... | MichaelMackus/hsrl | RL/Generator/Dungeon.hs | mit | 3,362 | 0 | 19 | 859 | 1,122 | 597 | 525 | 61 | 4 |
module Unison.Typechecker.Extractor where
import Unison.Prelude hiding (whenM)
import Control.Monad.Reader
import qualified Data.List as List
import Data.List.NonEmpty ( NonEmpty )
import qualified Data.Set as Set
import Unison.Referenc... | unisonweb/platform | parser-typechecker/src/Unison/Typechecker/Extractor.hs | mit | 11,800 | 0 | 26 | 3,130 | 4,317 | 2,251 | 2,066 | -1 | -1 |
#!/usr/bin/env stack
{- stack --system-ghc --resolver lts-18.18 script
--package "text"
--package "vector"
-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import System.Environment
import System.Exit
import System.IO
import Data.List
import Data.Function (on)
import Data.Vector (Vector, fromList, ... | joelelmercarlson/stack | haskell/travel.hs | mit | 1,428 | 0 | 14 | 345 | 663 | 373 | 290 | 34 | 1 |
module Gold55 where
import Data.List
-- 2014 latest year available
gold1792Avg = (sum gold1792) / (genericLength gold1792)
gold1823Avg = (sum gold1823) / (genericLength gold1823)
gold1868Avg = (sum gold1868) / (genericLength gold1868)
gold1917Avg = (sum gold1917) / (genericLength gold1917)
gold1955Avg = (sum gold19... | HaskellForCats/HaskellForCats | gold55.hs | mit | 3,035 | 325 | 10 | 1,175 | 1,193 | 710 | 483 | 221 | 1 |
module WoofEval (eval) where
data WoofVal = WoofObjectRef Integer
deriving (Eq)
showVal :: WoofVal -> String
showVal (WoofObjectRef num) = "Obj:" ++ (show num)
instance Show WoofVal where show = showVal
data WoofError = NumArgs Integer [WoofVal]
| TypeMismatch String W... | aemoncannon/woof | compiler/woof_error.hs | mit | 1,457 | 0 | 8 | 433 | 385 | 199 | 186 | 30 | 1 |
module Network.Acme.Util where
import qualified Data.Aeson.TH as Aeson
import Data.Char
import Data.List
import Language.Haskell.TH
dropPrefix :: [Char] -> [Char] -> [Char]
dropPrefix pre list =
case stripPrefix pre list of
Nothing -> error $ "Can't strip prefix " ++ pre ++ " fr... | Philonous/hs-acme | src/Network/Acme/Util.hs | mit | 669 | 0 | 13 | 186 | 230 | 123 | 107 | 20 | 2 |
-- Mysterious function
-- http://www.codewars.com/kata/55217af7ecb43366f8000f76/
module Codewars.Kata.Mysterious where
getNum :: Integer -> Integer
getNum = foldr f 0 . show
where f c | c `elem` "069" = succ
| c == '8' = succ . succ
| otherwise = id
| gafiatulin/codewars | src/6 kyu/Mysterious.hs | mit | 284 | 0 | 10 | 75 | 80 | 42 | 38 | 6 | 1 |
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-unused-top-binds #-}
import MyInit
import Data.Tim... | naushadh/persistent | persistent-mysql/test/main.hs | mit | 6,583 | 0 | 24 | 1,399 | 1,117 | 598 | 519 | 151 | 1 |
-- Copyright (c) 2016-present, SoundCloud Ltd.
-- All rights reserved.
--
-- This source code is distributed under the terms of a MIT license,
-- found in the LICENSE file.
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
module Kubern... | soundcloud/haskell-kubernetes | lib/Kubernetes/Model/V1/ContainerPort.hs | mit | 1,816 | 0 | 14 | 525 | 343 | 202 | 141 | 43 | 1 |
{-# LANGUAGE RecordWildCards, TemplateHaskell, ViewPatterns #-}
module Yesod.Routes.TH.Dispatch
( MkDispatchSettings (..)
, mkDispatchClause
, defaultGetHandler
) where
import Prelude hiding (exp)
import Language.Haskell.TH.Syntax
import Web.PathPieces
import Data.Maybe (catMaybes)
import Control.Monad... | meteficha/yesod | yesod-core/Yesod/Routes/TH/Dispatch.hs | mit | 7,794 | 1 | 29 | 3,328 | 2,154 | 1,108 | 1,046 | -1 | -1 |
{- |
module: $Header$
description: Probability
license: MIT
maintainer: Joe Leslie-Hurd <joe@gilith.com>
stability: provisional
portability: portable
-}
module OpenTheory.Random
where
import qualified OpenTheory.Primitive.Natural as Natural
import qualified OpenTheory.Primitive.Random as Random
vector :: (Random.Ra... | gilith/opentheory | data/haskell/opentheory-probability/src/OpenTheory/Random.hs | mit | 553 | 0 | 11 | 89 | 158 | 88 | 70 | 9 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-activity.html
module Stratosphere.Resources.StepFunctionsActivity where
import Stratosphere.Reso... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/StepFunctionsActivity.hs | mit | 1,476 | 0 | 15 | 197 | 188 | 109 | 79 | 25 | 1 |
module WrapEnum where
-- Move through an enumeration, but wrap around when hitting the end
wrapSucc, wrapPred :: (Enum a, Bounded a, Eq a) => a -> a
wrapSucc a | a == maxBound = minBound
| otherwise = succ a
wrapPred a | a == minBound = maxBound
| otherwise = pred a
| blitzcode/rust-exp | hs-src/WrapEnum.hs | mit | 300 | 0 | 8 | 87 | 97 | 48 | 49 | 6 | 1 |
module GHCJS.DOM.RTCConfiguration (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/RTCConfiguration.hs | mit | 46 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Consensus.Raft
-- Copyright : (c) Phil Hargett 2014
-- License : MIT (see LICENSE file)
... | hargettp/raft | src/Control/Consensus/Raft.hs | mit | 24,515 | 0 | 35 | 7,524 | 6,018 | 2,934 | 3,084 | 419 | 7 |
module Day5 (day5, day5', run, startsWithZeros, applyHash) where
import Crypto.Hash.MD5 (hash)
import Data.ByteString.Base16 (encode)
import qualified Data.ByteString.Char8 (pack, unpack)
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS (index, isPrefixOf, pack)
import Data.List (elemIndex, n... | brianshourd/adventOfCode2016 | src/Day5.hs | mit | 2,606 | 0 | 11 | 471 | 757 | 421 | 336 | 41 | 3 |
{- Copyright (C) 2014 Calvin Beck
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 limitation the rights to use, copy, modify, merge,
publish, ... | Chobbes/TimePaper | TimePaper/Parser.hs | mit | 3,431 | 0 | 13 | 1,014 | 536 | 257 | 279 | 54 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module PGIP.GraphQL.Resolver (resolve) where
import qualified PGIP.GraphQL.Resolver.DGraph as DGraphResolver
import qualified PGIP.GraphQL.Resolver.OMS as OMSResolver
import qualified PGIP.GraphQL.Resolver.Serialization as SerializationResolver
import qualified PGIP.GraphQL.Resolver... | spechub/Hets | PGIP/GraphQL/Resolver.hs | gpl-2.0 | 3,556 | 0 | 17 | 637 | 792 | 403 | 389 | 65 | 10 |
module TestFakeAst where
import FakeAst
f x =
(
(HsModule
(AJust
((ModuleName("TestFakeAst"))))
(ANothing)
(SomeArray([
(
(ImportDecl
(NoSourceText)
((ModuleName("FakeAst")))
(ANothing)
(False)
(False)
(False)
(False)
(ANothing)
(ANothing)))]))
(SomeArr... | h4ck3rm1k3/gcc-ontology | tests/FakeAst3.hs | gpl-3.0 | 135,387 | 0 | 239 | 47,793 | 67,519 | 37,375 | 30,144 | 11,570 | 1 |
-- Haskell Music Player, client for the MPD (Music Player Daemon)
-- Copyright (C) 2011 Ivan Vitjuk <v@iv.id.au>
-- This program 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 Licen... | ivitjuk/Haskell-Music-Player | src/GuiData.hs | gpl-3.0 | 1,461 | 0 | 9 | 346 | 160 | 111 | 49 | 22 | 0 |
{-# LANGUAGE
GeneralizedNewtypeDeriving
, MultiParamTypeClasses
, FunctionalDependencies
, NamedFieldPuns
#-}
module Runtime.Runtime where
import Control.Concurrent
import Control.Monad.State (StateT, execStateT)
import Control.Monad.Except
import Data.Map.Strict (Map, (!))
import qualified Data.Map.Str... | antarestrader/sapphire | Runtime/Runtime.hs | gpl-3.0 | 1,348 | 0 | 11 | 299 | 457 | 254 | 203 | 39 | 1 |
{-# LANGUAGE DeriveDataTypeable, TypeFamilies #-}
module Main where
import Hip.HipSpec
import Prelude hiding ((+), (*), (++), (&&),(||),not)
import Data.Typeable
import Test.QuickCheck hiding (Prop)
import Control.Applicative
data Bin = One | ZeroAnd Bin | OneAnd Bin deriving (Show, Eq, Ord, Typeable)
data Nat = Z |... | danr/hipspec | examples/old-examples/quickspec/BinLists.hs | gpl-3.0 | 3,241 | 2 | 17 | 1,154 | 1,190 | 621 | 569 | 82 | 1 |
{-# 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.WebmasterTo... | brendanhay/gogol | gogol-webmaster-tools/gen/Network/Google/WebmasterTools/Types/Product.hs | mpl-2.0 | 24,097 | 0 | 20 | 5,919 | 4,614 | 2,649 | 1,965 | 512 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Grouplicenses/Get.hs | mpl-2.0 | 5,190 | 0 | 19 | 1,231 | 782 | 455 | 327 | 116 | 1 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE UnicodeSyntax #-}
module Main where
import AttoScoped (sep,value,statefulParseOnly)
import Event(Event,eventOrNamespace,event,source)
import Decision(Decision,decisionClass)
import Maker
import GatherStrings (gatherStrings)
import qualifie... | joelwilliamson/validator | CheckFile.hs | agpl-3.0 | 11,928 | 0 | 24 | 2,241 | 3,845 | 2,011 | 1,834 | 217 | 3 |
{-# OPTIONS_GHC -Wall #-}
-- |
-- Module : Data.Change.Row
-- Copyright : Copyright (C) 2013 Leigh Simpson <code@simpleigh.com>
-- License : GNU LGPL 2.1
--
-- Functions and types for operations involving rows.
module Data.Change.Row (
-- * Row type
Row(),
-- ** Creating rows
fromList,
... | simpleigh/change.hs | src/Data/Change/Row.hs | lgpl-2.1 | 7,406 | 0 | 12 | 2,254 | 1,736 | 932 | 804 | 137 | 1 |
--------------------------------------------------------------------------------
-- See end of this file for licence information.
--------------------------------------------------------------------------------
-- |
-- Module : Swish
-- Copyright : (c) 2003, Graham Klyne, 2009 Vasili I Galchin, 2011, 2012 D... | DougBurke/swish | src/Swish.hs | lgpl-2.1 | 12,019 | 0 | 18 | 2,667 | 1,504 | 878 | 626 | 147 | 12 |
module Main where
data Position t = Position t deriving (Show)
stagger (Position d) = Position (d + 2)
crawl (Position d) = Position (d + 1)
rtn x = x
x >>== f = f x
| Leonidas-from-XIV/7langs7weeks | haskell/drunken-monad.hs | apache-2.0 | 188 | 0 | 7 | 59 | 91 | 47 | 44 | 6 | 1 |
{-
Copyright 2015 Tristan Aubrey-Jones
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 to in writing, sof... | flocc-net/flocc | v0.1/Compiler/Front/Indices.hs | apache-2.0 | 3,748 | 0 | 16 | 883 | 1,081 | 556 | 525 | 62 | 2 |
module AlecSequences.A333400 (a333400, a333400_list) where
import AlecSequences.A333398 (a333398_list)
import Helpers.ListHelpers (firstDifferences)
a333400_list = 0 : firstDifferences a333398_list
a333400 n = a333400_list !! (n - 1)
| peterokagey/haskellOEIS | src/AlecSequences/A333400.hs | apache-2.0 | 236 | 0 | 7 | 27 | 65 | 37 | 28 | 5 | 1 |
module Aws where
-- module that gets list of spot prices
import System.IO
import Control.Monad.IO.Class
import Control.Applicative
import Data.Time.Clock
import qualified Data.List as List
import Control.Lens
import Data.Maybe
import Data.Text
import qualified Data.Map as Map
-- amazon imports
import ... | huseyinyilmaz/spotprices | src/Aws.hs | apache-2.0 | 2,981 | 0 | 17 | 825 | 904 | 491 | 413 | 67 | 3 |
module Database.SqlServer.Create.FullTextStopList
(
FullTextStopList
) where
import Database.SqlServer.Create.Identifier
import Database.SqlServer.Create.Entity
import Test.QuickCheck
import Text.PrettyPrint hiding (render)
import Control.Monad
data FullTextStopList = FullTextStopList
{
... | fffej/sql-server-gen | src/Database/SqlServer/Create/FullTextStopList.hs | bsd-2-clause | 1,102 | 0 | 14 | 312 | 287 | 152 | 135 | 28 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Distribution.Nixpkgs.Haskell.FromCabal.Name ( toNixName, libNixName, buildToolNixName ) where
import Data.Maybe
import Data.String
import Distribution.Package
import Distribution.Text
import Language.Nix
-- | Map Cabal names to Nix attribute names.
toNixName :: PackageName -... | Fuuzetsu/cabal2nix | src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs | bsd-3-clause | 12,942 | 0 | 8 | 5,221 | 1,973 | 941 | 1,032 | 176 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-... | nkpart/applicatives | src/Control/Applicative/Stacks.hs | bsd-3-clause | 3,785 | 0 | 10 | 780 | 990 | 553 | 437 | 58 | 1 |
{-# LANGUAGE TypeFamilies #-}
-----------------------------------------------------------------------------
-- The fuel monad
-----------------------------------------------------------------------------
module Compiler.Hoopl.Fuel
( Fuel, infiniteFuel, fuelRemaining
, withFuel
, FuelMonad(..)
, FuelMonadT(..... | ezyang/hoopl | src/Compiler/Hoopl/Fuel.hs | bsd-3-clause | 3,209 | 0 | 13 | 680 | 992 | 523 | 469 | 59 | 2 |
module Web.Zenfolio.PhotoSets (
createPhotoSet,
deletePhotoSet,
getPopularSets,
getRecentSets,
loadPhotoSet,
movePhotoSet,
reorderPhotoSet,
searchSetByCategory,
searchSetByText,
setPhotoSetTitlePhoto,
setPhotoSetFeaturedIndex,
updatePhotoSet,
updatePhotoSetAccess,
... | md5/hs-zenfolio | Web/Zenfolio/PhotoSets.hs | bsd-3-clause | 2,370 | 0 | 11 | 489 | 511 | 284 | 227 | 54 | 1 |
module Domains.Trigonometric where
class Trigonometric a where
sin :: a -> a
cos :: a -> a
tan :: a -> a
asin :: a -> a
acos :: a -> a
atan :: a -> a
instance Trigonometric Double where
sin = Prelude.sin
cos = Prelude.cos
tan = Prelude.tan
asin = Prelude.asin
acos = Prelude.acos
atan = Prelude... | pmilne/algebra | src/Domains/Trigonometric.hs | bsd-3-clause | 326 | 0 | 7 | 85 | 119 | 66 | 53 | 15 | 0 |
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
-- | PureB - restrict a behavior to the pure subset. PureB does not
-- export a `wrap` function, thus developers cannot inject effectful
-- behaviors into PureB. Instead, one can only compose or unwrap a
-- pure behavior.
--
-- The advantage of pure behaviors o... | dmbarbour/Sirea | src/Sirea/Trans/Pure.hs | bsd-3-clause | 2,714 | 0 | 9 | 616 | 769 | 407 | 362 | 55 | 1 |
{-# LANGUAGE OverloadedStrings, RankNTypes, GADTs, OverloadedLists,
MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances, FlexibleContexts, StandaloneDeriving, DeriveDataTypeable #-}
{-
Column datastore approach
-}
module Quark.Base.Raw
(
ColumnMemoryStore(..),
VPair(..),
... | jhoxray/muon | src/Quark/Base/Raw.hs | bsd-3-clause | 7,069 | 0 | 15 | 1,716 | 1,810 | 972 | 838 | -1 | -1 |
{-# LANGUAGE LambdaCase, RecordWildCards, TemplateHaskell, OverloadedStrings #-}
module AbstractInterpretation.Sharing.CodeGen where
import Control.Monad.State
import Data.Set (Set)
import Data.Map (Map)
import Data.Vector (Vector)
import qualified Data.Set as Set
import qualified Data.Map as Map
import qualified Dat... | andorp/grin | grin/src/AbstractInterpretation/Sharing/CodeGen.hs | bsd-3-clause | 5,082 | 0 | 14 | 961 | 1,095 | 577 | 518 | 85 | 10 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamili... | kylcarte/lnfunctors | src/Control/LnMonad/List/Reader.hs | bsd-3-clause | 1,963 | 0 | 14 | 457 | 759 | 401 | 358 | 57 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module BSP.Tests.UART.Types where
import Ivory.Language
[ivory| string struct UARTBuffer 128 |]
| GaloisInc/ivory-tower-stm32 | ivory-bsp-tests/BSP/Tests/UART/Types.hs | bsd-3-clause | 259 | 0 | 4 | 35 | 25 | 19 | 6 | 8 | 0 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Series (largestProduct)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
specs :: Spec
specs = describe "largestPro... | c19/Exercism-Haskell | largest-series-product/test/Tests.hs | mit | 2,154 | 0 | 12 | 630 | 444 | 217 | 227 | 53 | 1 |
{-
Copyright © 2014 Intel Corporation
Copyright © 2016-2017 Auke Booij
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that copyright
notice and this perm... | abooij/sudbury | Graphics/Sudbury/Socket/Wayland.hs | mit | 3,350 | 0 | 21 | 865 | 545 | 284 | 261 | 48 | 2 |
{- |
Module : $Id: Haskell.hs 13959 2010-08-31 22:15:26Z cprodescu $
Copyright : (c) Christian Maeder and Uni Bremen 2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : mostly portable
This folder contains the Haskell logic b... | nevrenato/HetsAlloy | Haskell.hs | gpl-2.0 | 1,101 | 0 | 2 | 207 | 5 | 4 | 1 | 1 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
----------------------------------------------... | 573/leksah | src/IDE/Pane/PackageEditor.hs | gpl-2.0 | 80,244 | 0 | 36 | 27,779 | 20,786 | 10,846 | 9,940 | -1 | -1 |
module XorTernary (combineTernaryXors, tests) where
import XorCnf
--import XorGauss
import XorCnfSimplify
import qualified Data.Map as Map
import Data.List
import Data.Maybe
import Test.HUnit
import qualified Data.Set as Set
key :: Var -> Var -> (Var,Var)
key x y
| x < y = (x,y)
| otherwise = (y,x)
addXor ::... | a1880/xor | xcnf-preprocess/XorTernary.hs | gpl-3.0 | 2,785 | 0 | 13 | 1,131 | 1,149 | 618 | 531 | 50 | 1 |
module TypeUndefTycon2 where
data A a = A Ink | roberth/uu-helium | test/staticerrors/TypeUndefTycon2.hs | gpl-3.0 | 48 | 0 | 6 | 11 | 14 | 9 | 5 | 2 | 0 |
{-# 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-kinesis/gen/Network/AWS/Kinesis/GetShardIterator.hs | mpl-2.0 | 8,681 | 0 | 13 | 1,764 | 877 | 543 | 334 | 106 | 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-codepipeline/gen/Network/AWS/CodePipeline/PollForThirdPartyJobs.hs | mpl-2.0 | 5,370 | 0 | 13 | 1,128 | 691 | 412 | 279 | 89 | 1 |
{-# LANGUAGE FlexibleContexts #-}
-- |
-- Module : Statistics.Sample
-- Copyright : (c) 2008 Don Stewart, 2009 Bryan O'Sullivan
-- License : BSD3
--
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : portable
--
-- Commonly used sample statistics, also known as descriptive
-- statis... | bos/statistics | Statistics/Sample.hs | bsd-2-clause | 15,666 | 0 | 13 | 3,613 | 3,069 | 1,687 | 1,382 | 214 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[RnPat]{Renaming of patterns}
Basically dependency analysis.
Handles @Match@, @GRHSs@, @HsExpr@, and @Qualifier@ datatypes. In
general, all of these functions return a renamed thing, and a set of
free variables.
-}
{-# LANGUAGE CPP, RankNTypes, S... | olsner/ghc | compiler/rename/RnPat.hs | bsd-3-clause | 35,303 | 29 | 23 | 11,408 | 6,625 | 3,578 | 3,047 | -1 | -1 |
{-# LANGUAGE RebindableSyntax #-}
{-# OPTIONS_GHC -fplugin Control.Supermonad.Plugin #-}
{-
******************************************************************************
* H M T C *
* ... | jbracker/supermonad-plugin | examples/monad/hmtc/supermonad/Name.hs | bsd-3-clause | 1,035 | 0 | 4 | 553 | 20 | 15 | 5 | 5 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for mutli-maps
-}
{-
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. Redistribu... | leshchevds/ganeti | test/hs/Test/Ganeti/Utils/MultiMap.hs | bsd-2-clause | 3,018 | 0 | 15 | 560 | 480 | 266 | 214 | 38 | 1 |
data X = A | B
data Y = C | D
data Z = E | F
| itchyny/vim-haskell-indent | test/datatype/multiple.out.hs | mit | 45 | 0 | 5 | 18 | 31 | 18 | 13 | 3 | 0 |
module HList
( H
, repH
, absH
) where
type H a = [a] -> [a]
{-# INLINE repH #-}
repH :: [a] -> H a
repH xs = (xs ++)
{-# INLINE absH #-}
absH :: H a -> [a]
absH f = f []
-- -- Should be in a "List" module
-- {-# RULES "++ []" forall xs . xs ++ [] = xs #-}
-- {-# RULES "++ strict" ... | conal/hermit | examples/flatten/HList.hs | bsd-2-clause | 627 | 0 | 6 | 226 | 96 | 59 | 37 | 11 | 1 |
-- Bug.hs
{-# LANGUAGE ApplicativeDo #-}
module Main where
import Data.Functor.Identity
f :: Identity () -> Identity [Int] -> Identity Int
f i0 i1 = do
_ <- i0
[x] <- i1
pure (x + 42)
main :: IO ()
main = print $ f (Identity ()) (Identity [])
| sdiehl/ghc | testsuite/tests/ado/T16628.hs | bsd-3-clause | 258 | 0 | 9 | 64 | 119 | 61 | 58 | 10 | 1 |
{-
(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... | green-haskell/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | 48,683 | 0 | 25 | 14,708 | 12,975 | 6,578 | 6,397 | 931 | 8 |
{-# LANGUAGE BangPatterns #-}
-- |
-- Module : Data.Text.Internal.Encoding.Fusion.Common
-- Copyright : (c) Tom Harper 2008-2009,
-- (c) Bryan O'Sullivan 2009,
-- (c) Duncan Coutts 2009,
-- (c) Jasper Van der Jeugt 2011
--
-- License : BSD-style
-- Maintainer : bos... | bgamari/text | src/Data/Text/Internal/Encoding/Fusion/Common.hs | bsd-2-clause | 4,275 | 0 | 15 | 1,473 | 1,429 | 734 | 695 | 87 | 6 |
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Test where
class C t where
type TF t
ttt :: TF t -> t
b :: (C t, ?x :: TF t) => t
b = ttt ?x
| ezyang/ghc | testsuite/tests/typecheck/should_compile/T5120.hs | bsd-3-clause | 216 | 0 | 8 | 53 | 63 | 36 | 27 | 9 | 1 |
{-# LANGUAGE MultiParamTypeClasses,RankNTypes,ExistentialQuantification,DatatypeContexts #-}
module RnFail055 where
import RnFail055_aux
-- Id with different type
f1 :: Int -> Float
f1 = undefined
-- type synonym with different arity
type S1 a b = (a,b)
-- type synonym with different rhs
type S2 a b = forall a. (a,... | urbanslug/ghc | testsuite/tests/rename/should_fail/RnFail055.hs | bsd-3-clause | 1,017 | 0 | 9 | 216 | 265 | 166 | 99 | -1 | -1 |
{-# LANGUAGE MultiWayIf #-}
module Main where
x = 10
x1 = if | x < 10 -> "< 10" | otherwise -> ""
x2 = if | x < 10 -> "< 10"
| otherwise -> ""
x3 = if | x < 10 -> "< 10"
| otherwise -> ""
x4 = if | True -> "yes"
x5 = if | True -> if | False -> 1 | True -> 2
x6 = if | x < 10 -> if | True -> "yes"
... | urbanslug/ghc | testsuite/tests/parser/should_run/ParserMultiWayIf.hs | bsd-3-clause | 462 | 0 | 10 | 170 | 228 | 113 | 115 | 15 | 3 |
module Haks.Types where
import BasicPrelude hiding (empty)
import Control.Monad.Reader
import Data.Sequence
import Data.Maybe
import Data.Text hiding (empty)
data ParticleConfig = ParticleConfig
{ pre_processor_hc :: [Char] -> [Char]
, tokenizer_hc :: Char -> Maybe (Token,Char)
, cleanup_hc :: [(Token... | mlitchard/haks | src/Haks/Types.hs | isc | 832 | 0 | 13 | 172 | 257 | 156 | 101 | 33 | 1 |
module Test.Laws
( prop_leftIdentity, prop_rightIdentity, prop_identity, prop_annihilation
, prop_associative, prop_commutative, prop_monotonic
, prop_monoid, prop_Monoid
, prop_tnorm, prop_Tnorm
, prop_tconorm, prop_Tconorm
, T(..)
) where
import Data.Tnorm
import D... | pxqr/fuzzy-set | Test/Laws.hs | mit | 3,011 | 0 | 11 | 909 | 1,211 | 626 | 585 | 59 | 1 |
{-# LANGUAGE PatternGuards #-}
import Data.List
import Data.List.Split
import Data.Char (isDigit)
import Control.Monad.Par
main :: IO ()
main = do
content <- readFile "input.txt"
let ls = lines content
let instructions = map parseInstruction ls
let g = createGridPar instructions
putStr . show $... | Dr-Horv/Advent-of-code | day06/day6.hs | mit | 3,032 | 0 | 13 | 834 | 1,285 | 672 | 613 | 72 | 1 |
module NewickParser (parseNewickTree) where
-- Hm, for now it will parse String, not Data.Text (but the trees should be very
-- small compared to the alignments, so it should make no difference).
import Text.ParserCombinators.Parsec
import qualified Data.Text as T
import Data.Tree
identifier :: Parser String
identi... | tjunier/mlgsc | src/NewickParser.hs | mit | 1,975 | 0 | 12 | 515 | 637 | 318 | 319 | 48 | 2 |
import SFML.System
main = do
clock <- createClock
loop clock 3
destroy clock
loop clock 0 = return ()
loop clock n = do
sfSleep $ seconds 0.150
time <- getElapsedTime clock
if asSeconds time >= 1
then putStrLn "tick" >> restartClock clock >> loop clock (n-1)
else loop clock n... | SFML-haskell/SFML | demos/time/main.hs | mit | 322 | 0 | 11 | 96 | 126 | 57 | 69 | 12 | 2 |
module Oden.Output.Compiler where
import Text.PrettyPrint.Leijen
import Oden.Compiler
import Oden.Compiler.Monomorphization
import Oden.Output
import Oden.Output.Instantiate ()
import Oden.Pretty ()
instance OdenOutput MonomorphErr... | AlbinTheander/oden | src/Oden/Output/Compiler.hs | mit | 1,443 | 0 | 9 | 371 | 395 | 197 | 198 | 27 | 0 |
{-|
Eyre: Http Server Driver
-}
module Urbit.Vere.Eyre
( eyre
, eyre'
)
where
import Urbit.Prelude hiding (Builder)
import Urbit.Arvo hiding (ServerId, reqUrl)
import Urbit.King.App ( killKingActionL
, HasKingId(..)
,... | urbit/urbit | pkg/hs/urbit-king/lib/Urbit/Vere/Eyre.hs | mit | 12,047 | 0 | 19 | 2,990 | 3,916 | 2,004 | 1,912 | -1 | -1 |
module Solidran.Iprb.DetailSpec (spec) where
import Test.Hspec
import Solidran.Iprb.Detail
import qualified Data.Map as Map
spec :: Spec
spec = do
describe "Solidran.Iprb.Detail" $ do
describe "totalProb" $ do
it "should work on the given example" $ do
totalProb (Map.fromList [... | Jefffrey/Solidran | test/Solidran/Iprb/DetailSpec.hs | mit | 1,330 | 0 | 21 | 516 | 364 | 194 | 170 | 30 | 1 |
import Data.List
import qualified Control.Monad
import qualified Data.Map as Map
import Text.Regex
import Control.Concurrent
import Control.Concurrent.STM.TChan
import Control.Concurrent.Async
import Control.Monad.STM
import Control.Monad
--Premiere étape du pipeline, écrit dans le channel
fstPipe :: (a -> b) -> TCha... | bruno-cadorette/IFT630-TP1 | TP1.hs | mit | 4,067 | 13 | 14 | 773 | 1,341 | 670 | 671 | 78 | 2 |
module Mega1 where
mega1 :: String
mega1 = "mega1"
| fpco/simple-mega-repo | mega1/Mega1.hs | mit | 52 | 0 | 4 | 10 | 14 | 9 | 5 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-admincreateuserconfig.html
module Stratosphere.ResourceProperties.CognitoUserPoolAdminCreate... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/CognitoUserPoolAdminCreateUserConfig.hs | mit | 3,415 | 0 | 12 | 252 | 349 | 200 | 149 | 33 | 1 |
{-# LANGUAGE DeriveGeneric #-}
module Web.Google.Calendar.User where
import Data.Text (Text)
import GHC.Generics
data User = User {
id :: Text,
email :: Text,
displayName :: Text,
self :: Bool
} deriving (Show, Eq, Generic, Ord)
| tippenein/google-calendar | src/Web/Google/Calendar/User.hs | mit | 263 | 0 | 8 | 69 | 76 | 47 | 29 | 10 | 0 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module JobApplication.Types
(
Applicant(..)
, ApplicantResponse(..)
) where
import Data.Aeson
import Data.SafeCopy
import Data.Text
import Data.Typeable
import GHC.Gene... | tippenein/job-application | src/JobApplication/Types.hs | mit | 882 | 0 | 11 | 165 | 251 | 139 | 112 | 26 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module NPDA.Konfiguration where
import NPDA.Type
import Autolib.ToDoc
import Autolib.Set
import Data.Typeable
data Konfiguration x y z =
Konfiguration { schritt :: Int
, eingabe :: [ x ]
, zustand :: z
, keller :: [ y ]
, link :: Maybe (Konfiguration x y ... | marcellussiegburg/autotool | collection/src/NPDA/Konfiguration.hs | gpl-2.0 | 1,903 | 64 | 10 | 494 | 694 | 365 | 329 | 47 | 2 |
module Test where {
f x = case x of {0 -> case x of {0->1};2->3};
}
| bredelings/BAli-Phy | tests/optimizer/4/test.hs | gpl-2.0 | 68 | 0 | 10 | 17 | 46 | 28 | 18 | 2 | 2 |
{-# OPTIONS_GHC -optc-DDBUS_API_SUBJECT_TO_CHANGE #-}
{-# LINE 1 "DBus/Shared.hsc" #-}
-- HDBus -- Haskell bindings for D-Bus.
{-# LINE 2 "DBus/Shared.hsc" #-}
-- Copyright (C) 2006 Evan Martin <martine@danga.com>
-- tell Haddock not to doc this module:
-- #hide
{-# LINE 8 "DBus/Shared.hsc" #-}
{-# LINE 9 "DBus/Sha... | hamaxx/unity-2d-for-xmonad | xmonad-files/DBus-0.4/dist/build/DBus/Shared.hs | gpl-3.0 | 1,340 | 0 | 4 | 185 | 132 | 93 | 39 | 21 | 1 |
module HEP.Automation.MadGraph.Dataset.Set20110316set11 where
import HEP.Automation.MadGraph.Model
import HEP.Automation.MadGraph.Machine
import HEP.Automation.MadGraph.UserCut
import HEP.Automation.MadGraph.Cluster
import HEP.Automation.MadGraph.SetupType
import HEP.Automation.MadGraph.Dataset.Common
my_ssetup :: ... | wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110316set11.hs | gpl-3.0 | 1,697 | 0 | 10 | 409 | 360 | 222 | 138 | 46 | 1 |
import Algorithms.Hungarian
import Criterion.Main
import Data.Algorithm.Munkres
import Data.Array.Unboxed
import System.Random
sample :: [Double]
sample = take 2000 $ randomRs (-100, 100) (mkStdGen 4)
sample' :: [Double]
sample' = take 40000 $ randomRs (-1000, 1000) (mkStdGen 24)
sampleArray :: UArray (Int, Int) Dou... | kaizhang/hungarian-munkres | benchmarks/bench.hs | gpl-3.0 | 883 | 0 | 13 | 182 | 310 | 168 | 142 | 20 | 1 |
module Language.Mulang.Parsers.JavaScript (js, js', parseJavaScript) where
import Language.Mulang.Ast
import Language.Mulang.Ast.Operator (Operator (..))
import Language.Mulang.Builder (compact, compactMap)
import Language.Mulang.Parsers
import Language.Mulang.Transform.Normalizer (normalize)
import Language.Mulang.No... | mumuki/mulang | src/Language/Mulang/Parsers/JavaScript.hs | gpl-3.0 | 18,526 | 0 | 11 | 4,322 | 5,217 | 2,613 | 2,604 | 232 | 4 |
import Distribution.Simple
import Distribution.Simple.Setup
import Distribution.Simple.Program
import Distribution.Simple.Program.Types
import Distribution.Simple.Utils
import Distribution.Verbosity
import Distribution.PackageDescription
import System.FilePath
import System.Process
import System.Exit
main = defaultMai... | cgo/jalla | Setup.hs | gpl-3.0 | 2,270 | 0 | 20 | 486 | 636 | 326 | 310 | 54 | 3 |
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Test.Framework.TH
import Test.Framework
import Test.HUnit
import Test.Framework.Providers.HUnit
import Language.C2ATS
main :: IO ()
main = $(defaultMainGenerator)
case_1 = 1 @=? 1
| metasepi/c2ats | test/Main.hs | gpl-3.0 | 242 | 0 | 6 | 33 | 61 | 37 | 24 | 10 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
-- |
-- Module : Network.Google.SafeBrowsing
-- Copyright : (c) 2015-2016 Brendan Hay
-- License : Mozilla... | rueshyna/gogol | gogol-safebrowsing/gen/Network/Google/SafeBrowsing.hs | mpl-2.0 | 5,048 | 0 | 7 | 1,190 | 498 | 356 | 142 | 132 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-dns/gen/Network/Google/Resource/DNS/Changes/Create.hs | mpl-2.0 | 4,147 | 0 | 17 | 1,008 | 551 | 327 | 224 | 86 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Accounts/Clients/List.hs | mpl-2.0 | 6,573 | 0 | 20 | 1,531 | 988 | 570 | 418 | 140 | 1 |
-- The HiPar Toolkit: generates unique names
--
-- Author : Manuel M T Chakravarty
-- Created: 3 April 98
--
-- Version $Revision: 1.2 $ from $Date: 2004/11/13 17:26:50 $
--
-- Copyright (C) [1998..2003] Manuel M T Chakravarty
--
-- This file is free software; you can redistribute it and/or modify
-- it under th... | thiagoarrais/gtk2hs | tools/c2hs/base/general/UNames.hs | lgpl-2.1 | 5,951 | 4 | 12 | 1,294 | 748 | 427 | 321 | -1 | -1 |
-- | The Parser monad.
module Data.GI.GIR.Parser
( Parser
, ParseError
, parseError
, runParser
, parseName
, parseDeprecation
, parseDocumentation
, parseIntegral
, parseBool
, parseChildrenWithLocalName
, parseAllChildrenWithLocalName
, parseChildrenWithNSName
, ... | ford-prefect/haskell-gi | lib/Data/GI/GIR/Parser.hs | lgpl-2.1 | 8,628 | 0 | 17 | 1,990 | 1,920 | 1,010 | 910 | -1 | -1 |
module Main where
import Millionaire
import System.Environment (getArgs)
showAnswer :: Bool -> IO ()
showAnswer correct = putStrLn $ if correct then "You are right!" else "You are wrong."
gameloop :: [Question] -> IO ()
gameloop [] = return ()
gameloop (q:qs) = do
answer <- askQuestion q
showAnswer answer
gam... | ayakovlenko/millionaire | src/main/Main.hs | unlicense | 446 | 0 | 8 | 85 | 161 | 80 | 81 | 16 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.